#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main() {
int numero[3], ent[3];
cin >> ent[0];
cin >> ent[1];
cin >> ent[2];
sort(numero, numero + 3);
cout << numero[0] << ", " << numero[1] << ", " << numero[2] << endl ;
cout << ent[0] << ", " << ent[1] << ", " << ent[2];
}
//https://pt.stackoverflow.com/q/323411/101
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgaW50IG51bWVyb1szXSwgZW50WzNdOwogICAgY2luID4+IGVudFswXTsKICAgIGNpbiA+PiBlbnRbMV07CiAgICBjaW4gPj4gZW50WzJdOwogICAgc29ydChudW1lcm8sIG51bWVybyArIDMpOwogICAgY291dCA8PCBudW1lcm9bMF0gPDwgIiwgIiA8PCBudW1lcm9bMV0gPDwgIiwgIiA8PCBudW1lcm9bMl0gPDwgZW5kbCA7CiAgICBjb3V0IDw8IGVudFswXSA8PCAiLCAiIDw8IGVudFsxXSA8PCAiLCAiIDw8IGVudFsyXTsKfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMzIzNDExLzEwMQ==