#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a[6], u[3][100] = {};
  char name[100][25];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%s", &m, name[i]);
    while (m--) {
      scanf("%1d%1d-%1d%1d-%1d%1d", a, a + 1, a + 2, a + 3, a + 4, a + 5);
      int eq = 0, gt = 0;
      for (int j = 1; j < 6; j++) {
        if (a[j - 1] == a[j]) eq++;
        if (a[j - 1] > a[j]) gt++;
      }
      if (eq == 5)
        u[0][i]++;
      else if (gt == 5)
        u[1][i]++;
      else
        u[2][i]++;
    }
  }
  const char* data[] = {
      "If you want to call a taxi, you should call:",
      "If you want to order a pizza, you should call:",
      "If you want to go to a cafe with a wonderful girl, you should call:"};
  for (int i = 0; i < 3; i++) {
    int x = 0;
    printf("%s", data[i]);
    for (int j = 0; j < n; j++)
      if (u[i][j] >= u[i][x]) x = j;
    for (int j = 0; j < n; j++)
      if (u[i][j] == u[i][x]) {
        printf(" %s", name[j]);
        if (j == x)
          puts(".");
        else
          putchar(',');
      }
  }
}
