code: private static int compareTo(Deque<String> first, Deque<String> second) {
          if (0 == first.size() && 0 == second.size()) {
              return 0;
          }
          if (0 == first.size()) {
              return 1;
          }
          if (0 == second.size()) {
              return -1;
          }
          int headsComparation = (Integer.valueOf(first.remove())).compareTo(Integer.parseInt(second.remove()));
          if (0 == headsComparation) {
              return compareTo(first, second);
          } else {
              return headsComparation;
          }
      }
docs: Compares two string ordered lists containing numbers.
  @return -1 when first group is higher, 0 if equals, 1 when second group is higher