#include <bits/stdc++.h>
using namespace std;
int n, m;
int b[3];
char s[111], p[111];
vector<string> v[3];
int main() {
  scanf("%d", &n);
  memset(b, -1, sizeof(b));
  for (int i = 0; i < n; i++) {
    scanf("%d%s", &m, s);
    int c[3];
    memset(c, 0, sizeof(c));
    for (int j = 0; j < m; j++) {
      scanf("%s", p);
      if (p[0] == p[1] && p[1] == p[3] && p[3] == p[4] && p[4] == p[6] &&
          p[6] == p[7])
        c[0]++;
      else if (p[0] > p[1] && p[1] > p[3] && p[3] > p[4] && p[4] > p[6] &&
               p[6] > p[7])
        c[1]++;
      else
        c[2]++;
    }
    for (int j = 0; j < 3; j++) {
      if (c[j] > b[j]) {
        v[j].clear();
        b[j] = c[j];
      }
      if (c[j] == b[j]) {
        v[j].push_back((string)s);
      }
    }
  }
  for (int i = 0; i < 3; i++) {
    if (i == 0) printf("If you want to call a taxi, you should call:");
    if (i == 1) printf("If you want to order a pizza, you should call:");
    if (i == 2)
      printf(
          "If you want to go to a cafe with a wonderful girl, you should "
          "call:");
    for (int j = 0; j < v[i].size(); j++) {
      if (j > 0) printf(",");
      printf(" %s", v[i][j].c_str());
    }
    printf(".\n");
  }
}
