#include <bits/stdc++.h>
using namespace std;
vector<string> domain;
map<string, vector<string> > mp1, mp2;
string s;
string calc(vector<string> s) {
  sort(s.begin(), s.end());
  string res;
  string last;
  for (auto it = s.begin(); it != s.end(); ++it) {
    if (*it == last) continue;
    res.append(*it);
    last = *it;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> s;
    s.push_back('/');
    s = s.substr(7);
    int pos = s.find_first_of('/');
    string r = s.substr(pos);
    mp1[s.substr(0, pos)].push_back(r);
  }
  for (auto it = mp1.begin(); it != mp1.end(); ++it) {
    string t = calc(it->second);
    mp2[t].push_back(it->first);
  }
  int ans = 0;
  for (auto it = mp2.begin(); it != mp2.end(); ++it) {
    if (it->second.size() > 1) {
      ++ans;
    }
  }
  cout << ans << endl;
  for (auto it = mp2.begin(); it != mp2.end(); ++it) {
    if (it->second.size() > 1) {
      for (auto i = it->second.begin(); i != it->second.end(); ++i) {
        cout << "http://" << *i << " ";
      }
      cout << endl;
    }
  }
}
