#include <bits/stdc++.h>
using namespace std;
long long maxx(long long a, long long b) { return a > b ? a : b; }
bool cmp(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
map<string, set<string> > m;
map<set<string>, vector<string> > mr;
int main() {
  int n;
  cin >> n;
  string s[n];
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < s[i].length() - 1; j++)
      if (s[i][j] == '/' && s[i][j + 1] == '/')
        s[i][j] = '+', s[i][j + 1] = '+';
  }
  for (int i = 0; i < n; i++) {
    int j;
    string host = "";
    for (j = 0; j < s[i].length(); j++)
      if (s[i][j] == '/')
        break;
      else
        host += s[i][j];
    string t = "";
    for (int k = j; k < s[i].length(); k++) t += s[i][k];
    m[host].insert(t);
  }
  ostringstream os;
  int ct = 0;
  for (map<string, set<string> >::iterator it = m.begin(); it != m.end(); it++)
    mr[it->second].push_back(it->first);
  for (map<set<string>, vector<string> >::iterator it = mr.begin();
       it != mr.end(); it++)
    if (it->second.size() > 1) {
      ct++;
      vector<string> w = it->second;
      for (vector<string>::iterator itt = w.begin(); itt != w.end(); itt++) {
        string z = *itt;
        for (int q = 0; q < z.length(); q++)
          if (z[q] == '+') z[q] = '/';
        os << z << " ";
      }
      os << endl;
    }
  cout << ct << endl << os.str() << endl;
  return 0;
}
