#include <bits/stdc++.h>
using namespace std;
char name[110][30];
char tmp[10];
bool checkT() {
  for (int i = 1; i < 6; i++)
    if (tmp[i] != tmp[i - 1]) return (false);
  return (true);
}
bool checkP() {
  for (int i = 1; i < 6; i++)
    if (tmp[i] >= tmp[i - 1]) return (false);
  return (true);
}
struct Comp {
  bool operator()(const int& a, const int& b) const { return (a > b); }
};
map<int, vector<int>, Comp> MT;
map<int, vector<int>, Comp> MP;
map<int, vector<int>, Comp> MG;
int main() {
  int n;
  scanf("%d\n", &n);
  for (int i = 0; i < n; i++) {
    int s;
    scanf("%d %s\n", &s, name[i]);
    int cntT = 0, cntP = 0, cntG = 0;
    for (int j = 0; j < s; j++) {
      scanf("%c%c-%c%c-%c%c\n", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4],
            &tmp[5]);
      if (checkT()) {
        cntT++;
        continue;
      }
      if (checkP()) {
        cntP++;
        continue;
      }
      cntG++;
    }
    MT[cntT].push_back(i);
    MP[cntP].push_back(i);
    MG[cntG].push_back(i);
  }
  printf("If you want to call a taxi, you should call: %s",
         name[MT.begin()->second[0]]);
  for (vector<int>::iterator it = ++(MT.begin()->second.begin());
       it != MT.begin()->second.end(); it++)
    printf(", %s", name[*it]);
  printf(".\n");
  printf("If you want to order a pizza, you should call: %s",
         name[MP.begin()->second[0]]);
  for (vector<int>::iterator it = ++(MP.begin()->second.begin());
       it != MP.begin()->second.end(); it++)
    printf(", %s", name[*it]);
  printf(".\n");
  printf(
      "If you want to go to a cafe with a wonderful girl, you should call: %s",
      name[MG.begin()->second[0]]);
  for (vector<int>::iterator it = ++(MG.begin()->second.begin());
       it != MG.begin()->second.end(); it++)
    printf(", %s", name[*it]);
  printf(".");
  return (0);
}
