#include <bits/stdc++.h>
char name[105][25];
int a[105], b[105], c[105];
int main() {
  int n, i, m, j, x, y, z, max1, max2, max3, c1, c2, c3, d1, d2, d3;
  char ch[6];
  while (scanf("%d", &n) != EOF) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    memset(c, 0, sizeof(c));
    for (i = 1; i <= n; i++) {
      scanf("%d%s", &m, name[i]);
      getchar();
      for (j = 1; j <= m; j++) {
        scanf("%c%c-%c%c-%c%c", &ch[0], &ch[1], &ch[2], &ch[3], &ch[4], &ch[5]);
        getchar();
        if (ch[0] == ch[1] && ch[1] == ch[2] && ch[2] == ch[3] &&
            ch[3] == ch[4] && ch[4] == ch[5]) {
          a[i]++;
        } else if (ch[0] > ch[1] && ch[1] > ch[2] && ch[2] > ch[3] &&
                   ch[3] > ch[4] && ch[4] > ch[5]) {
          b[i]++;
        } else {
          c[i]++;
        }
      }
    }
    max1 = max2 = max3 = -1;
    for (i = 1; i <= n; i++) {
      if (a[i] > max1) max1 = a[i];
      if (b[i] > max2) max2 = b[i];
      if (c[i] > max3) max3 = c[i];
    }
    c1 = c2 = c3 = 0;
    for (i = 1; i <= n; i++) {
      if (a[i] == max1) c1++;
      if (b[i] == max2) c2++;
      if (c[i] == max3) c3++;
    }
    printf("If you want to call a taxi, you should call:");
    d1 = d2 = d3 = 0;
    for (i = 1; i <= n; i++) {
      if (a[i] == max1) {
        d1++;
        if (d1 < c1)
          printf(" %s,", name[i]);
        else
          printf(" %s.", name[i]);
      }
    }
    printf("\n");
    printf("If you want to order a pizza, you should call:");
    for (i = 1; i <= n; i++) {
      if (b[i] == max2) {
        d2++;
        if (d2 < c2)
          printf(" %s,", name[i]);
        else
          printf(" %s.", name[i]);
      }
    }
    printf("\n");
    printf(
        "If you want to go to a cafe with a wonderful girl, you should call:");
    for (i = 1; i <= n; i++) {
      if (c[i] == max3) {
        d3++;
        if (d3 < c3)
          printf(" %s,", name[i]);
        else
          printf(" %s.", name[i]);
      }
    }
    printf("\n");
  }
  return 0;
}
