#include <bits/stdc++.h>
using namespace std;
const unsigned long long SEED = 3e2 + 57;
const unsigned long long BASE = 1e4 + 317;
const long long INF = 2e7 + 7;
const int N = 1e5 + 7;
const int MOD = 1e9 + 7;
const double Pi = acos(-1.);
const double EPS = 1e-7;
int n, m;
char str[100];
struct Node {
  char host[30], path[30];
  bool operator<(const Node &p) const {
    return strcmp(host, p.host) < 0 ||
           (strcmp(host, p.host) == 0 && strcmp(path, p.path) < 0);
  }
  bool operator==(const Node &p) const {
    return strcmp(host, p.host) == 0 && strcmp(path, p.path) == 0;
  }
} a[N];
struct HASH {
  int id;
  unsigned long long val;
  bool operator<(const HASH &p) const { return val < p.val; }
} b[N];
void read(int x) {
  scanf(" %s", str);
  int i = 7, j = 0;
  while (('a' <= str[i] && str[i] <= 'z') || str[i] == '.') {
    a[x].host[j++] = str[i++];
  }
  a[x].host[j] = '\0';
  j = 0;
  while (('a' <= str[i] && str[i] <= 'z') || str[i] == '.' || str[i] == '/') {
    a[x].path[j++] = str[i++];
  }
  if (!j) a[x].path[j++] = '$';
  a[x].path[j] = '\0';
}
unsigned long long hsv(char s[]) {
  unsigned long long val = 0;
  for (int i = 0; s[i]; ++i) val = val * SEED + s[i];
  return val;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    read(i);
  }
  sort(a, a + n);
  n = unique(a, a + n) - a;
  for (int i = 0; i < n;) {
    int j = i + 1;
    while (j < n && strcmp(a[i].host, a[j].host) == 0) ++j;
    b[m].id = i;
    for (; i < j; ++i) b[m].val = b[m].val * BASE + hsv(a[i].path);
    ++m;
  }
  sort(b, b + m);
  int k = 0;
  for (int i = 0; i < m;) {
    int j = i + 1;
    while (j < m && b[i].val == b[j].val) ++j;
    if (j - i > 1) ++k;
    i = j;
  }
  printf("%d\n", k);
  for (int i = 0; i < m;) {
    int j = i + 1;
    while (j < m && b[i].val == b[j].val) ++j;
    if (j - i > 1) {
      printf("http://%s", a[b[i].id].host);
      for (k = i + 1; k < j; ++k) printf(" http://%s", a[b[k].id].host);
      puts("");
    }
    i = j;
  }
  return 0;
}
