public Puzzle read(String input) {
		List<Integer> data = getData(input);
		switch (data.size()) {
		case 1:
			return new Puzzle1(data);
		case 4:
			return new Puzzle2(data);
		case 16:
			return new Puzzle4(data);
		case 81:
			return new Puzzle9(data);
		default:
			throw new IllegalArgumentException("Illegal size of data "
					+ data.size());
		}
	}