public static void main(String[] args) throws UnsupportedEncodingException {
		int count = 0;
		ArrayList<Double> list = new ArrayList<Double>();
		Map<String, Double> orderList = new HashMap<String, Double>();
		try {
			Scanner fileScanner = new Scanner(new File("input.txt"));
			while(fileScanner.hasNext()){
				String[] tokens = fileScanner.nextLine().split("\\s");
				orderList.put(tokens[0], Double.parseDouble((tokens[1])));
				list.add(Double.parseDouble((tokens[1])));
			}
			Collections.sort(list);
			PrintWriter writer = new PrintWriter("Output.txt", "UTF-8");
			for (int i = 0; i < list.size(); i++) {
				for (Map.Entry<String, Double> e : orderList.entrySet()) {
					if(e.getValue().compareTo(list.get(i)) == 0){
						System.out.printf( " %.2f %s",e.getValue(), e.getKey());
						writer.printf(" %.2f %s",e.getValue(), e.getKey());
					}
				}
				writer.println();
				System.out.println();
			}
//			for (int i = 0; i < list.size(); i++) {
//				System.out.printf("%.2f ",list.get(i));
//			}
			writer.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}