#include <bits/stdc++.h>
using namespace std;
int n, nstrs, nhosts;
map<string, int> strind;
vector<string> strs;
map<int, int> hostind;
vector<pair<vector<int>, int> > hosts;
bool operator<(vector<int> &l, vector<int> &r) {
  if (l.size() < r.size())
    return true;
  else if (l.size() > r.size())
    return false;
  for (size_t i = 0; i < l.size(); i++) {
    if (l[i] < r[i])
      return true;
    else if (l[i] > r[i])
      return false;
  }
  return false;
}
bool operator==(vector<int> &l, vector<int> &r) {
  return l.size() == r.size() && equal(l.begin(), l.end(), r.begin());
}
int ngroups;
vector<int> group[100000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  string adr;
  for (int i = 0; i < n; i++) {
    string host, path;
    cin >> adr;
    adr += "/";
    size_t separator = adr.find_first_of('/', 7);
    host = adr.substr(0, separator);
    path = adr.substr(separator + 1);
    if (!strind.count(host)) {
      strind[host] = nstrs++;
      strs.push_back(host);
    }
    if (!strind.count(path)) {
      strind[path] = nstrs++;
      strs.push_back(path);
    }
    int curhind = strind[host];
    if (!hostind.count(curhind)) {
      hostind[curhind] = hosts.size();
      hosts.push_back(make_pair(vector<int>(), curhind));
    }
    hosts[hostind[curhind]].first.push_back(strind[path]);
  }
  for (auto &c : hosts) {
    sort(c.first.begin(), c.first.end());
    c.first.resize(unique(c.first.begin(), c.first.end()) - c.first.begin());
  }
  sort(hosts.begin(), hosts.end());
  for (size_t second = 0, e = 0; e <= hosts.size(); e++) {
    if (e == hosts.size() || !(hosts[second].first == hosts[e].first)) {
      while (second < e) {
        group[ngroups].push_back(hosts[second].second);
        second++;
      }
      ngroups++;
    }
  }
  int cnt = 0;
  for (int i = 0; i < ngroups; i++)
    if (group[i].size() > 1) cnt++;
  cout << cnt << '\n';
  for (int i = 0; i < ngroups; i++)
    if (group[i].size() > 1) {
      for (auto c : group[i]) cout << strs[c] << ' ';
      cout << '\n';
    }
  return 0;
}
