#include <bits/stdc++.h>
using namespace std;
map<string, int> m, store;
map<string, int>::iterator it;
vector<string> v[100005];
vector<int> ans[100005];
string a[100005];
int main() {
  std::ios_base::sync_with_stdio(0);
  int cases, n = 0, i, j, k, cnt, sum, sz;
  string str, s, t;
  cin >> cases;
  while (cases--) {
    cin >> str;
    if (store.find(str) != store.end()) continue;
    store[str] = 1;
    k = str.size();
    s = "";
    for (i = 7; i <= k - 1; i++) {
      if (str[i] == '/') break;
      s += str[i];
    }
    t = "#";
    while (i < k) {
      t += str[i];
      i++;
    }
    if (m.find(s) == m.end()) {
      a[n] = s;
      m[s] = n++;
    }
    v[m[s]].push_back(t);
  }
  m.clear();
  sz = 0;
  for (i = 0; i <= n - 1; i++) {
    sort(v[i].begin(), v[i].end());
    k = v[i].size();
    t = "";
    for (j = 0; j <= k - 1; j++) t += v[i][j];
    if (m.find(t) == m.end()) m[t] = sz++;
    ans[m[t]].push_back(i);
  }
  cnt = 0;
  for (i = 0; i <= sz - 1; i++) {
    if (ans[i].size() > 1) cnt++;
  }
  cout << cnt << '\n';
  for (i = 0; i <= sz - 1; i++) {
    k = ans[i].size();
    if (k < 2) continue;
    cout << "http://" << a[ans[i][0]];
    for (j = 1; j <= k - 1; j++) cout << " http://" << a[ans[i][j]];
    cout << '\n';
  }
  return 0;
}
