// i wants to take ioi
//binhtinhtutinkhongcaycunhungmotkhikhongcontutinnualatuyetvong
#include <bits/stdc++.h>

using namespace std;

#define int long long
#define nn "\n"
#define pi pair<int, int>
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define eb emplace_back
#define pb push_back
#define TASK " "

#define ms(a, x) memset(a, x, sizeof(a))
#define all(a) a.begin(), a.end()
#define All(a, n) a + 1, a + 1 + n

#define LOG 19


const int INF = 1e18;
const int mod = 1e9+7;
const int N = 1e5  + 5;
int MOD = 998244353;
int bit[200000];
struct node{
	int kc, u, hk;
	bool operator<(const node& other) const {
        return kc > other.kc;
    }
};
struct edge{
	int v, w, h;
};

void nhap(){
    
}
void solve(){
	string s; cin >> s;
	int n = s.size();
    for(int len = 1; len <= n; len++){
        if(n % len == 0){
            string x = s.substr(0, len);
            string temp = "";
            int t = n / len;
            for(int i = 0; i < t; i++){
                temp += x;
            }
            if(temp == s){
                cout << x << nn;
                return;
            }
        }
    }
}
signed main() {
    // freopen("npms.inp", "r", stdin);
    // freopen("npms.out", "w", stdout);
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
    nhap();
    solve();
	return 0;

}
