#include<bits/stdc++.h>
using namespace std;
int main() {
    int n;
    cin>>n;
    while(n--) {
    int h,m;
    cin>>h>>m;
    if(h>m)
        cout<<"PRINCIPIO\n";
    else
        cout<<"ROMANCE\n";
    }
    return 0;
}