#include<bits/stdc++.h> using namespace std; int main(){ string s[3]; for(int i = 0;i<3;i++)getline(cin,s[i]); sort(s,s+3); for(int i = 0;i<3;i++) cout<<s[i]<<endl; return 0; }
Double click to view unformatted code.