#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6;
map<string, map<string,double> > mp;
map<string, map<double,double> > mmp;
map<string,double> mmmp;
struct hh{
string gender;
string out;
double hight;
}a[MAX];
void init(){
a[1].gender="f";a[1].hight=1.6;a[1].out="short";
a[2].gender="m";a[2].hight=2;a[2].out="tall";
a[3].gender="f";a[3].hight=1.9;a[3].out="medium";
a[4].gender="f";a[4].hight=1.88;a[4].out="medium";
a[5].gender="f";a[5].hight=1.7;a[5].out="short";
a[6].gender="m";a[6].hight=1.85;a[6].out="medium";
a[7].gender="f";a[7].hight=1.6;a[7].out="short";
a[8].gender="m";a[8].hight=1.7;a[8].out="short";
a[9].gender="m";a[9].hight=2.2;a[9].out="tall";
a[10].gender="m";a[10].hight=2.1;a[10].out="tall";
a[11].gender="f";a[11].hight=1.8;a[11].out="medium";
a[12].gender="m";a[12].hight=1.95;a[12].out="medium";
a[13].gender="f";a[13].hight=1.9;a[13].out="medium";
a[14].gender="f";a[14].hight=1.8;a[14].out="medium";
a[15].gender="f";a[15].hight=1.75;a[15].out="medium";
}
double shor,tal,med;
void cun(){
for (int i = 1; i<=15;i++){
if(a[i].hight>0&&a[i].hight<=1.6) a[i].hight=0;
if(a[i].hight>1.6&&a[i].hight<=1.7) a[i].hight=1;
if(a[i].hight>1.7&&a[i].hight<=1.8) a[i].hight=2;
if(a[i].hight>1.8&&a[i].hight<=1.9) a[i].hight=3;
if(a[i].hight>1.9&&a[i].hight<=2.0) a[i].hight=4;
if(a[i].hight>2.0) a[i].hight=5;
}
shor=tal=med=0;
for (int i = 1; i <= 15;i++){
if(a[i].out=="short") shor++;
else if(a[i].out=="tall") tal++;
else med++;
}
mmmp["short"]=shor;
mmmp["tall"]=tal;
mmmp["medium"]=med;
shor=shor/15;
tal=tal/15;
med=med/15;
for (int i = 1; i <= 15;i++){
if(a[i].gender=="f"&&a[i].out=="tall") mp["tall"]["f"]++;
if(a[i].gender=="f"&&a[i].out=="medium") mp["medium"]["f"]++;
if(a[i].gender=="f"&&a[i].out=="short") mp["short"]["f"]++;
if(a[i].gender=="m"&&a[i].out=="tall") mp["tall"]["m"]++;
if(a[i].gender=="m"&&a[i].out=="medium") mp["medium"]["m"]++;
if(a[i].gender=="m"&&a[i].out=="short") mp["short"]["m"]++;
if(a[i].hight==0&&a[i].out=="tall") mmp["tall"][0]++;
if(a[i].hight==0&&a[i].out=="medium") mmp["medium"][0]++;
if(a[i].hight==0&&a[i].out=="short") mmp["short"][0]++;
if(a[i].hight==1&&a[i].out=="tall") mmp["tall"][1]++;
if(a[i].hight==1&&a[i].out=="medium") mmp["medium"][1]++;
if(a[i].hight==1&&a[i].out=="short") mmp["short"][1]++;
if(a[i].hight==2&&a[i].out=="tall") mmp["tall"][2]++;
if(a[i].hight==2&&a[i].out=="medium") mmp["medium"][2]++;
if(a[i].hight==2&&a[i].out=="short") mmp["short"][2]++;
if(a[i].hight==3&&a[i].out=="tall") mmp["tall"][3]++;
if(a[i].hight==3&&a[i].out=="medium") mmp["medium"][3]++;
if(a[i].hight==3&&a[i].out=="short") mmp["short"][3]++;
if(a[i].hight==4&&a[i].out=="tall") mmp["tall"][4]++;
if(a[i].hight==4&&a[i].out=="medium") mmp["medium"][4]++;
if(a[i].hight==4&&a[i].out=="short") mmp["short"][4]++;
if(a[i].hight==5&&a[i].out=="tall") mmp["tall"][5]++;
if(a[i].hight==5&&a[i].out=="medium") mmp["medium"][5]++;
if(a[i].hight==5&&a[i].out=="short") mmp["short"][5]++;
}
}
hh x;
void gao(){
double x1=(mmp["tall"][x.hight]/mmmp["tall"])*(mp["tall"][x.gender]/mmmp["tall"])*tal;
double x2=(mmp["medium"][x.hight]/mmmp["medium"])*(mp["medium"][x.gender]/mmmp["medium"])*med;
double x3=(mmp["short"][x.hight]/mmmp["short"])*(mp["short"][x.gender]/mmmp["short"])*shor;
double maxx=max(max(x1,x2),x3);
if(maxx==x1) puts("tall");
else if(maxx==x2) puts("medinum");
else puts("short");
}
int main(){
init();
cun();
cin >> x.gender >> x.hight;
if(x.hight>0&&x.hight<=1.6) x.hight=0;
if(x.hight>1.6&&x.hight<=1.7) x.hight=1;
if(x.hight>1.7&&x.hight<=1.8) x.hight=2;
if(x.hight>1.8&&x.hight<=1.9) x.hight=3;
if(x.hight>1.9&&x.hight<=2.0) x.hight=4;
if(x.hight>2.0) x.hight=5;
gao();
return 0;
}