#include <bits/stdc++.h>  

using namespace std;

#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

int main() {
	int a[5];
	while(scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4]) != EOF) {
		bool three = false, four = false, straight = false, full = false;
		int pair = 0, count = 1;
		sort(a, a + 5);
		rep(i, 4) {
			if(a[i] == a[i+1]) ++count;
			else count = 1;
			if(count == 4) four = true;
			if(count == 3) three = true;
			else if(count == 2) ++pair;
		}
		rep(i, 4) {
			if(a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13) {
				straight = true;
				break;
			}
			if(a[i] != a[i + 1] - 1) {
				straight = false;
				break;
			}
			else straight = true;
		}
		if(three && pair == 2) full = true;
		if(four) cout << "four card" << endl;
		else if(full) cout << "full house" << endl;
		else if(straight) cout << "straight" << endl;
		else if(three) cout << "three card" << endl;
		else if(pair == 2) cout << "two pair" << endl;
		else if(pair == 1) cout << "one pair" << endl;
		else cout << "null" << endl;
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define rev(i, n) for(int i = (int)(n - 1); i >= 0; i--)
#define rev1(i, n) for(int i = (int)(n); i > 0; i--)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define resort(v) sort((v).rbegin(), (v).rend())
#define vi vector<int>
#define vvi vector<vector<int>>
#define vc vector<char>
#define vvc vector<vector<char>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
using ll = long long;
using P = pair<int, int>;
/* ----------------よく使う数字や配列----------------- */
int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
constexpr ll mod = 1e9+7;
constexpr ll inf = LLONG_MAX;
constexpr long double eps = DBL_EPSILON;
constexpr long double pi = 3.141592653589793238462643383279;
/* ----------------------end----------------------- */

/* --------------------ライブラリ-------------------- */
ll fact(int i) {       //階乗
    if (i == 0) return 1;
    return (fact(i - 1)) * i;
}
ll gcd(ll a, ll b) {        //最大公約数
    if(b == 0) return a;
    return gcd(b, a % b); 
}
ll lcm(ll a, ll b) {      //最小公倍数
    return a * b / gcd(a, b);
}
int keta(ll n) {        //桁数を求める
    if(n == 0) return 1;
    int count = 0;
    while(n != 0) {
        n /= 10;
        count++;
    }
    return count;
}
ll ketasum(ll n) {    //各桁の和
    ll sum = 0;
    while(n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
/* ----------------------end----------------------- */


int main() {
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    int p = a+b,q=c+d;
    if(p>q) cout << "Left" << endl;
    else if(p<q) cout << "Right" << endl;
    else cout << "Balanced" << endl;
    
    return 0;
}