#include <bits/stdc++.h>
using namespace std;
int N, sz, l, G, num;
string s[100100], s1, s2;
struct ss {
  int G;
  vector<string> v;
  map<string, int> m;
  int add(string x) {
    if (m.count(x))
      return m[x];
    else {
      v.push_back(x), m[x] = G;
      return G++;
    }
  }
} d, p;
vector<int> v[100100];
map<vector<int>, int> m;
vector<int> ans[100100];
int main() {
  cin >> N;
  for (int i = 0; i < (N); i++) {
    cin >> s[i];
    sz = (int)s[i].size();
    l = 7;
    while (l < sz && s[i][l] != '/') l++;
    s1 = s[i].substr(7, l - 7), s2 = '#' + s[i].substr(l);
    int a = d.add(s1), b = p.add(s2);
    v[a].push_back(b);
  }
  for (int i = 0; i < (d.G); i++) {
    sort(v[i].begin(), v[i].end());
    v[i].erase(unique(v[i].begin(), v[i].end()), v[i].end());
    if (m.count(v[i]))
      ans[m[v[i]]].push_back(i);
    else
      ans[G].push_back(i), m[v[i]] = G++;
  }
  for (int i = 0; i < (G); i++)
    if ((int)ans[i].size() > 1) num++;
  cout << num << '\n';
  for (int i = 0; i < (G); i++)
    if ((int)ans[i].size() > 1) {
      for (int j = 0; j < ((int)ans[i].size()); j++) {
        if (j) cout << ' ';
        cout << "http://" + d.v[ans[i][j]];
      }
      cout << '\n';
    }
  return 0;
}
