class StringContainer {

  public String getSubString(int index) {
    int realIndex = index >= 0 ? index : count + index;
    if (realIndex < 0 || realIndex >= count) {
      throw new IndexOutOfBoundsException(String.format(
          "Index: %d, Real Index: %d, Size: %d", index, realIndex, count));
    }
    if (realIndex < reverseList.size()) {
      return reverseList.get(reverseList.size() - 1 - realIndex);
    } else {
      return sequenceList.get(realIndex - reverseList.size());
    }
  }

  public  StringContainer();
  public  StringContainer(String joinSeparator);
  public  StringContainer(String[] strings);
  public  StringContainer(String[] strings, String joinSeparator);

}