#include <iostream>
#include <map>
#include <sstream>
#include <utility>

using namespace std;

int main() {
	istringstream file("155\n168\n0\n364\n245\n20\n546\n156\n13");
	map<int, pair<int, int>> frame2PointTable;
	pair<int, pair<int, int>> temp;
	
	while(file >> temp.second.first >> temp.second.second >> temp.first) frame2PointTable.insert(temp);
	
    for(const auto& i : frame2PointTable) cout << i.first << ": (" << i.second.first << ", " << i.second.second << ")\n";	
}