private static Example parseExample(String record) {
    String[] tokens = record.split(",");
    double[] input = new double[10];
    if(tokens[0].equals("M")) input[0] = 1.0;
    if(tokens[1].equals("F")) input[1] = 1.0;
    if(tokens[2].equals("I")) input[2] = 1.0;
    for(int i = 1; i < tokens.length - 1; i++) {
      input[i + 2] = Double.parseDouble(tokens[i]);
    }

    double[] output = new double[32];
    output[Integer.parseInt(tokens[tokens.length - 1])] = 1.0;

    return new Example(input, output);
  }