// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;

public class DiskToMem {
    public static List<Data> load(Reader rdr) throws IOException {
        List<Data> res = new ArrayList<Data>();
        BufferedReader br = new BufferedReader(rdr);
        String line;
        while((line = br.readLine()) != null) {
            String[] parts = line.split(",");
            int a = Integer.parseInt(parts[0]);
            int b = Integer.parseInt(parts[1]);
            int c = Integer.parseInt(parts[2]);
            res.add(new Data(a, b, c));
        }
        br.close();
        return res;
    }
    public static void main(String[] args) throws IOException {
        List<Data> lst = load(new StringReader("1,2,3\r\n4,5,6\r\n7,8,9"));
        for(Data o : lst) {
            System.out.println(o.getA() + " " + o.getB() + " " + o.getC());
        }
    }
}

class Data {
    private int a;
    private int b;
    private int c;
    public Data(int a, int b, int c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }
    public int getA() {
        return a;
    }
    public void setA(int a) {
        this.a = a;
    }
    public int getB() {
        return b;
    }
    public void setB(int b) {
        this.b = b;
    }
    public int getC() {
        return c;
    }
    public void setC(int c) {
        this.c = c;
    }
}
