// 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.*;
import java.util.*;

public class Parse {
    public static void main(String[] args) {
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("data.fil")));
            String line;
            while ( (line = reader.readLine()) != null) {
                StringTokenizer st = new StringTokenizer(line, " ");
                int iv = Integer.parseInt(st.nextToken());
                String sv1 = st.nextToken();
                double xv1 = Double.parseDouble(st.nextToken());
                String sv2 = st.nextToken();
                double xv2 = Double.parseDouble(st.nextToken());
                System.out.println(iv + " " + sv1 + " " + xv1 + " " + sv2 + " " + xv2);
            }
        } catch (NumberFormatException e) {
            e.printStackTrace();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
