#include <bits/stdc++.h>
using namespace std;
int k, n;
unordered_map<string, set<string> > m;
map<set<string>, vector<string> > v;
string s;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s, s += '/';
    int p = s.find('/', 7);
    m[s.substr(0, p)].insert(s.substr(p));
  }
  for (auto &i : m)
    v[i.second].push_back(i.first), k += (v[i.second].size() == 2);
  cout << k << '\n';
  for (auto &i : v)
    if (i.second.size() > 1) {
      for (auto &j : i.second) cout << j << ' ';
      cout << '\n';
    }
}
