#include <bits/stdc++.h>
using namespace std;
struct node {
  int tax, piz, g;
  char name[25];
} p[105];
int n, s, len, tmp[10];
char a[10];
void check(int t) {
  bool ft = true, fp = true;
  int tt = tmp[0];
  for (int i = 0; i < len; i++) {
    if (tmp[i] != tt) {
      ft = false;
      break;
    }
  }
  if (ft) {
    p[t].tax++;
  }
  for (int i = 1; i < len; i++) {
    if (tmp[i] >= tmp[i - 1]) {
      fp = false;
      break;
    }
  }
  if (fp) {
    p[t].piz++;
  }
  if (!ft && !fp) p[t].g++;
}
int main() {
  cin >> n;
  for (int t = 0; t < n; t++) {
    cin >> s >> p[t].name;
    for (int i = 0; i < s; i++) {
      scanf("%s", a);
      len = 0;
      for (int j = 0; j < 8; j++) {
        if (a[j] != '-') {
          tmp[len++] = a[j] - '0';
        }
      }
      check(t);
    }
  }
  for (int k = 0; k < 3; k++) {
    int maxx = -1;
    for (int i = 0; i < n; i++) {
      if (k == 0) {
        maxx = max(p[i].tax, maxx);
      } else if (k == 1) {
        maxx = max(p[i].piz, maxx);
      } else {
        maxx = max(p[i].g, maxx);
      }
    }
    int cnt = 0;
    if (k == 0) {
      printf("If you want to call a taxi, you should call:");
      for (int i = 0; i < n; i++) {
        if (p[i].tax == maxx) {
          cnt++;
        }
      }
      for (int i = 0; i < n; i++) {
        if (p[i].tax == maxx) {
          if (--cnt != 0) {
            printf(" %s,", p[i].name);
          } else {
            printf(" %s.", p[i].name);
          }
        }
      }
    } else if (k == 1) {
      printf("If you want to order a pizza, you should call:");
      for (int i = 0; i < n; i++) {
        if (p[i].piz == maxx) {
          cnt++;
        }
      }
      for (int i = 0; i < n; i++) {
        if (p[i].piz == maxx) {
          if (--cnt != 0) {
            printf(" %s,", p[i].name);
          } else {
            printf(" %s.", p[i].name);
          }
        }
      }
    } else {
      printf(
          "If you want to go to a cafe with a wonderful girl, you should "
          "call:");
      for (int i = 0; i < n; i++) {
        if (p[i].g == maxx) {
          cnt++;
        }
      }
      for (int i = 0; i < n; i++) {
        if (p[i].g == maxx) {
          if (--cnt != 0) {
            printf(" %s,", p[i].name);
          } else {
            printf(" %s.", p[i].name);
          }
        }
      }
    }
    puts("");
  }
  return 0;
}
