Implemented print_map function.