public void process(int u, int v) {
    // calculate the hash value for each node
    int a = hash(u);
    int b = hash(v);
    // generate output tuples
    for (int i = 0; i < p; i ++) {
      for (int j = i+1; j < p; j ++) {
        for (int k = j+1; k < p; k ++) {
          // if (a,b) belongs to {i,j,k}
          // output <(i,j,k), (u,v)>
        }
      }
    }

  }