#include int main() { int a, b, c; std::cin >> a >> b >> c; if(a>b&&b>c) std::cout << "A" << "\n" << "B" << "\n" << "C" << std::endl; if(a>c&&c>b) std::cout << "A" << "\n" << "C" << "\n" << "B" << std::endl; if(b>a&&a>c) std::cout << "B" << "\n" << "A" << "\n" << "C" << std::endl; if(b>c&&c>a) std::cout << "B" << "\n" << "C" << "\n" << "A" << std::endl; if(c>b&&b>a) std::cout << "C" << "\n" << "B" << "\n" << "A" << std::endl; if(c>a&&a>b) std::cout << "C" << "\n" << "A" << "\n" << "B" << std::endl; }