#include <bits/stdc++.h>
using namespace std;
const int MaxN = 205;
struct Node {
  int a[3], i;
} p[MaxN];
bool cmp0(Node p1, Node p2) {
  if (p1.a[0] != p2.a[0]) return p1.a[0] > p2.a[0];
  return p1.i < p2.i;
}
bool cmp1(Node p1, Node p2) {
  if (p1.a[1] != p2.a[1]) return p1.a[1] > p2.a[1];
  return p1.i < p2.i;
}
bool cmp2(Node p1, Node p2) {
  if (p1.a[2] != p2.a[2]) return p1.a[2] > p2.a[2];
  return p1.i < p2.i;
}
char name[MaxN][30];
char s[20];
int tp(char *s) {
  if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
      s[6] == s[7])
    return 0;
  if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] && s[6] > s[7])
    return 1;
  return 2;
}
int main() {
  int n, K;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%s", &K, name[i]);
    p[i].i = i;
    p[i].a[0] = p[i].a[1] = p[i].a[2] = 0;
    for (int j = 0; j < K; j++) {
      scanf("%s", s);
      p[i].a[tp(s)]++;
    }
  }
  sort(p, p + n, cmp0);
  printf("If you want to call a taxi, you should call: %s", name[p[0].i]);
  for (int i = 1; i < n; i++)
    if (p[i].a[0] == p[i - 1].a[0])
      printf(", %s", name[p[i].i]);
    else
      break;
  puts(".");
  sort(p, p + n, cmp1);
  printf("If you want to order a pizza, you should call: %s", name[p[0].i]);
  for (int i = 1; i < n; i++)
    if (p[i].a[1] == p[i - 1].a[1])
      printf(", %s", name[p[i].i]);
    else
      break;
  puts(".");
  sort(p, p + n, cmp2);
  printf(
      "If you want to go to a cafe with a wonderful girl, you should call: %s",
      name[p[0].i]);
  for (int i = 1; i < n; i++)
    if (p[i].a[2] == p[i - 1].a[2])
      printf(", %s", name[p[i].i]);
    else
      break;
  puts(".");
  return 0;
}
