#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
const int INF = 1E9;
const int MAXN = 100500;
const long long MOD[3] = {999989981, 999989957, 999979957};
const long long PW[3] = {1000010029, 1002010033, 1000510037};
struct piii {
  int x, y, z;
  piii(int _X = 0, int _Y = 0, int _Z = 0) {
    x = _X;
    y = _Y;
    z = _Z;
  }
};
bool operator==(piii a, piii b) {
  return a.x == b.x && a.y == b.y && a.z == b.z;
}
bool operator!=(piii a, piii b) { return !(a == b); }
bool operator<(piii a, piii b) {
  if (a.x != b.x) return a.x < b.x;
  if (a.y != b.y) return a.y < b.y;
  return a.z < b.z;
}
int n, m, sz;
string s, res[2];
long long tmp[3];
pair<piii, piii> hashes[MAXN];
pair<piii, piii> blocks[MAXN];
map<piii, string> strings, paths;
vector<piii> ans[MAXN];
piii getHash(string &s) {
  long long res[3];
  for (int i = 0; i < (int)(3); i++) {
    res[i] = 0;
    for (int j = 0; j < (int)(s.size()); j++)
      res[i] = (res[i] * PW[i] + s[j]) % MOD[i];
  }
  return piii(res[0], res[1], res[2]);
}
int main() {
  cin >> n;
  for (int i = 0; i < (int)(n); i++) {
    cin >> s;
    res[0] = "";
    res[1] = "/";
    int id = 0;
    for (int j = 0; j < (int)s.size(); j++) {
      if (id == 0 && j >= 7 && s[j] == '/') {
        id++;
      }
      res[id] += s[j];
    }
    piii p1 = getHash(res[0]);
    piii p2 = getHash(res[1]);
    strings[p1] = res[0];
    paths[p2] = res[1];
    hashes[i] = {p1, p2};
  }
  sort(hashes, hashes + n);
  n = unique(hashes, hashes + n) - hashes;
  int L = 0;
  m = 0;
  for (int i = 1; i <= n; i++)
    if (hashes[L].first != hashes[i].first || i == n) {
      tmp[0] = tmp[1] = tmp[2] = 0;
      s = "";
      for (int j = L; j < i; j++) s += paths[hashes[j].second] + '!';
      blocks[m] = {getHash(s), hashes[L].first};
      m++;
      L = i;
    }
  sort(blocks, blocks + m);
  L = 0;
  sz = 0;
  for (int i = 1; i <= m; i++)
    if (blocks[L].first != blocks[i].first || i == m) {
      if (L + 1 < i) {
        for (int j = L; j < i; j++) {
          ans[sz].push_back(blocks[j].second);
        }
        sz++;
      }
      L = i;
    }
  cout << sz << '\n';
  for (int i = 0; i < (int)(sz); i++) {
    for (int j = 0; j < (int)(ans[i].size()); j++)
      cout << strings[ans[i][j]] << " \n"[j == (int)ans[i].size() - 1];
  }
  return 0;
}
