public void writeToFile(File f) {
		long t0 = System.currentTimeMillis();
		System.out.println("Search and building tree");
		List<String> zipedFileList = new ArrayList<String>();
		frontOrderSearch(root, "", zipedFileList);
		long t1 = System.currentTimeMillis();
		System.out.println("Searching finished in " + (t1 - t0) + " ms");
		System.out.println("Writing file");
		PrintWriter writer = null;
		try {
			writer = new PrintWriter(f);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		for (String zipedLine : zipedFileList) {
			writer.println(zipedLine);
		}
		writer.close();
		long t2 = System.currentTimeMillis();
		System.out.println("Writing finished in " + (t2 - t1) + " ms");
	}