An 18-year-old boy accused of killing three girls at a dance class in northern England has admitted the attack on the first day of his trial.