Anomaly-free chiral theories in six dimensions