#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const int N = 1e6 + 20;
const long long int M = 1e9 + 7;
map<set<string>, vector<string> > answer;
map<string, set<string> > paths;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    int p = 7;
    while (p < s.length() && s[p] != '/') ++p;
    string path = "";
    if (p == s.length())
      path = "NO WAY";
    else if (p + 1 < s.length())
      path = s.substr(p + 1);
    paths[s.substr(0, p)].insert(path);
  }
  int k = 0;
  for (map<string, set<string> >::iterator it = paths.begin();
       it != paths.end(); ++it) {
    answer[it->second].push_back(it->first);
    k += answer[it->second].size() == 2;
  }
  cout << k << endl;
  for (map<set<string>, vector<string> >::iterator it = answer.begin();
       it != answer.end(); ++it) {
    if (it->second.size() > 1) {
      for (int i = 0; i < it->second.size(); ++i) cout << it->second[i] << ' ';
      cout << endl;
    }
  }
  return 0;
}
