public static void main(String[] args) throws FileNotFoundException {
		// TODO Auto-generated method stub
		TreeMap<String, Concordance> tm = new TreeMap<String, Concordance>();

		Scanner scanner = new Scanner(new File(args[0]));
		int row_num = 0;
		while (scanner.hasNextLine()) {
			row_num++;
			String[] words = scanner.nextLine().split(" ");
			for (String word : words) {
				String word_m = word.trim().toLowerCase();
				if (word_m.charAt(word_m.length() - 1) < 'a' || word_m.charAt(word_m.length() - 1) > 'z') {
					word_m = word_m.substring(0, word_m.length() - 1);
				}

				if (!tm.containsKey(word_m)) {
					Concordance instance = new Concordance(1);
					instance.addToList(row_num);
					tm.put(word_m, instance);
				} else {
					Concordance instance = tm.get(word_m);
					instance.incrementCount();
					instance.addToList(row_num);
				}
			}
		}
		scanner.close();

		for (Map.Entry<String, Concordance> entry : tm.entrySet()) {
			System.out.printf("%-20s%s:%s", entry.getKey(), "["+entry.getValue().getCount(), entry.getValue().getList().toString()+"]");
			System.out.println("");
		}

	}