#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <bitset>
#include <stdio.h>
#include <math.h>
using namespace std;
typedef std::vector<int> vi;
typedef std::vector<pair<int, int> > vii;
#define FOR(l) for(vi::iterator it=l.begin();it!=l.end();it++)
#define FOR_L(l, s, e) for(vi::iterator it=l.begin()+s;it!=l.end()-e;it++)
//----------Main source code -----------------//
int main() {
int m,n;
double num;
while(scanf("%d %d", &m, &n)!=EOF&&(m!=1||n!=1)){
num=(double)m/n;
string o="";
double mid=1;
int fn, fd, ln, ld, mn=1, md=1;
fn=0;fd=1;ln=1;ld=0;
while(!(m==mn&&n==md)){
mn=fn+ln;
md=ld+fd;
mid=(double)mn/md;
if(num>mid) fn=mn, fd=md, o+="R";
else if(num<mid) ln=mn, ld=md, o+="L";
}
cout<<o<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8Yml0c2V0PgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPG1hdGguaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdHlwZWRlZiBzdGQ6OnZlY3RvcjxpbnQ+IHZpOwp0eXBlZGVmIHN0ZDo6dmVjdG9yPHBhaXI8aW50LCBpbnQ+ID4gdmlpOwojZGVmaW5lIEZPUihsKSBmb3Iodmk6Oml0ZXJhdG9yIGl0PWwuYmVnaW4oKTtpdCE9bC5lbmQoKTtpdCsrKQojZGVmaW5lIEZPUl9MKGwsIHMsIGUpIGZvcih2aTo6aXRlcmF0b3IgaXQ9bC5iZWdpbigpK3M7aXQhPWwuZW5kKCktZTtpdCsrKQoKLy8tLS0tLS0tLS0tTWFpbiBzb3VyY2UgY29kZSAtLS0tLS0tLS0tLS0tLS0tLS8vCmludCBtYWluKCkgewoJaW50IG0sbjsKCWRvdWJsZSBudW07Cgl3aGlsZShzY2Fu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