public char getChar(List<Integer> satellites, int pos) {
    int count = 0;
    for (int x = 0; x < satellites.size(); x++) {
      if (pos % satellites.get(x) == 0) {
        count++;
      }
    }
    if (count % 2 == 0) {
      return '0';
    } else {
      return '1';
    }
  }