A9.com interview question

Write a program that reads a log and organize it by user.