#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1e5 + 1, inf = 1e9 + 1;
int n;
string s;
map<string, set<string> > m;
map<string, set<string> >::iterator it;
map<set<string>, set<string> > ms;
map<set<string>, set<string> >::iterator it2;
set<string> ss;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  while (n--) {
    cin >> s;
    int cnt = 7, si = s.size();
    while (cnt < si && s[cnt] != '/') cnt++;
    m[s.substr(0, cnt)].insert(s.substr(cnt, si - cnt));
  }
  for (it = m.begin(); it != m.end(); it++) ms[it->second].insert(it->first);
  int cnt = 0;
  for (it2 = ms.begin(); it2 != ms.end(); it2++) {
    if ((it2->second).size() > 1) cnt++;
  }
  cout << cnt << endl;
  for (it2 = ms.begin(); it2 != ms.end(); it2++) {
    ss = it2->second;
    if (ss.size() > 1) {
      while (ss.size()) {
        cout << *ss.begin() << " ";
        ss.erase(ss.begin());
      }
      cout << endl;
    }
  }
  return 0;
}
