#include<bits/stdc++.h>
using namespace std;
int main(){
  char a,b,c;
  cin>>a>>b>>c;
  cout<<b<<c<<a<<endl;
}
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define M 1000000007

ll powll(ll x, ll y) {
    ll re=1;
    rep(i, y) {
        re = re * x % M;
    }
    return re;
}

ll gcd(ll a, ll b)
{
    if (a%b == 0)
    {
        return(b);
    }
    else
    {
        return(gcd(b, a%b));
    }
}


int main() {


    ll n;
    cin >> n;

    vector<ll> outlist;

    for (ll i = 1;; i++) {
        ll j = 0;
        j = n / i;
        
        if (i > j) {
            break;
        }

        if (n%i == 0) {
            
            outlist.push_back(i);
            outlist.push_back(j);
        }
    }

    sort(outlist.begin(), outlist.end());
    outlist.erase(unique(outlist.begin(), outlist.end()),outlist.end());

    for (auto it = outlist.begin(); it != outlist.end(); ++it) {
        cout << *it << endl;
    }


    return 0;
}