#include <bits/stdc++.h> using ll = long long; template <typename T> constexpr T MOD() { return 1000000007; } template <typename T> constexpr T INF() { return std::numeric_limits<T>::max() / 16; } int main() { std::string S; std::cin >> S; std::reverse(S.begin(), S.end()); std::string ans; for (int i = 0; i < S.size(); i++) { ans.push_back(S[i]); if (i % 3 == 2 and i != S.size() - 1) { ans.push_back(','); } } std::reverse(ans.begin(), ans.end()); std::cout << ans << std::endl; return 0; }