#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
long long a;
cin >> a;
if(a == 1)
{
cout << "LGPD";
return 0;
}
long long l = 1,p= 1000000,mid;
while(l < p)
{
mid = (l+p+1)/2;
if(mid*mid == a)
{
for(int i = 0;i < mid;++i) cout << 'L';
for(int i = 0;i < mid;++i) cout << 'G';
for(int i = 0;i < mid;++i) cout << 'P';
for(int i = 0;i < mid;++i) cout << 'D';
return 0;
}
if(mid*mid > a)
{
p = mid-1;
}
if(mid*mid < a)
{
l = mid;
}
}
long long wyn = l*l;
if((a-wyn) <= l)
{
for(int i = 0;i < l+1;++i) cout << 'L';
for(int i = 0;i < (a-wyn);++i) cout << 'G';
cout << 'P';
for(int i = 0;i < l-(a-wyn);++i) cout << 'G';
for(int i = 0;i < l;++i) cout << 'P';
for(int i = 0;i < l;++i) cout << 'D';
return 0;
}
else
{
for(int i = 0;i < l+1;++i) cout << 'L';
for(int i = 0;i < l;++i) cout << 'G';
cout << 'P';
cout << 'G';
for(int i = 0;i < (a-wyn-l);++i) cout << 'P';
cout << "D";
for(int i = 0;i < l-(a-wyn-l);++i) cout << 'P';
for(int i = 0;i < l;++i) cout << 'D';
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewoJaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbygwKTsKCWxvbmcgbG9uZyBhOwoJY2luID4+IGE7CglpZihhID09IDEpCgl7CgkJY291dCA8PCAiTEdQRCI7CgkJcmV0dXJuIDA7Cgl9Cglsb25nIGxvbmcgbCA9IDEscD0gMTAwMDAwMCxtaWQ7Cgl3aGlsZShsIDwgcCkKCXsKCQltaWQgPSAobCtwKzEpLzI7CgkJaWYobWlkKm1pZCA9PSBhKQoJCXsKCQkJZm9yKGludCBpID0gMDtpIDwgbWlkOysraSkgY291dCA8PCAnTCc7CgkJCWZvcihpbnQgaSA9IDA7aSA8IG1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