

import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;

class Apr3 {

	public static void main(String[] args) {
	
		Sub[] array = new Sub[10];
		Scanner in = null;
		int count = 0;

		try {
			in = new Scanner(new File("data.txt"));
		}
		catch(FileNotFoundException e) {
			System.out.println("File not found");
			return;
		}

		in.useDelimiter(",|\n");

		while(in.hasNext()) {
			boolean b = in.nextBoolean();
			int i = in.nextInt();
			String s = in.next();
			float f = in.nextFloat();

			Sub sub = new Sub(b,i,s,f);
			boolean foundInArray = false;

			for(int jay = 0; jay < count; jay++) {
				if (array[jay].equals(sub)) {
					foundInArray = true;
					break;	
				}
			}
			
			if (foundInArray) {
				continue;
			}

			array[count++] = sub;
		}

		for(Sub s : array) {
			if (s != null) {
				System.out.println("* " + s);
			}
		}

		PrintWriter out = null;
		
		try {
			out = new PrintWriter(new File("nodups.txt"));
		}
		catch (FileNotFoundException e) {
			System.out.println("File not found");
			return;
		}

		for(Sub s : array) {
			if (s != null) {
				out.println(s);
			}
		}

		out.close();	

	}

} // end of class


