import java.util.Map;
import java.util.Map.Entry;

public class Main {
	public static void main(String[] args) {
		Map<Thread, StackTraceElement[]> threads = Thread.getAllStackTraces();

		for (Map.Entry<Thread, StackTraceElement[]> thread : threads.entrySet()) {
			System.out.println(thread.getKey().getName() + " :");
			for (StackTraceElement trace : thread.getValue()) {
				System.out.println("  " + trace.getClassName() + "." + trace.getMethodName() + "(" + trace.getFileName() + ":" + trace.getLineNumber() + ")");
			}
			System.out.println();
		}
	}
}