#include <bits/stdc++.h>
using namespace std;
string t, t2, line;
istringstream iss;
map<string, set<string>> m;
map<string, set<string>>::iterator it;
set<string>::iterator it2;
map<string, set<string>> m2;
long long n, c;
char ch;
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> line;
    iss.str(line);
    for (int i = 1; i <= 7; i++) iss >> ch;
    t.clear();
    t2.clear();
    for (; iss >> ch;) {
      if (ch == '/') {
        t2 += ch;
        break;
      }
      t += ch;
    }
    for (; iss >> ch;) {
      t2 += ch;
    }
    if (t2.empty()) t2 = "0";
    iss.clear();
    m[t].insert(t2);
  }
  for (it = m.begin(); it != m.end(); it++) {
    t.clear();
    for (it2 = (it->second).begin(); it2 != (it->second).end(); it2++) {
      t += (*it2);
      t += '1';
    }
    m2[t].insert(it->first);
  }
  c = 0;
  for (it = m2.begin(); it != m2.end(); it++) {
    if ((it->second).size() > 1) c++;
  }
  cout << c << "\n";
  for (it = m2.begin(); it != m2.end(); it++) {
    if ((it->second).size() > 1) {
      for (it2 = (it->second).begin(); it2 != (it->second).end(); it2++) {
        if (it2 != (it->second).begin()) cout << " ";
        cout << "http://" << (*it2);
      }
      cout << "\n";
    }
  }
  return 0;
}
