class CoincheckPair {
  CurrencyPair pair;

  public String toString() {
    return pairToString(this);
  }

  public static String pairToString(CoincheckPair pair) {
    String base = pair.getPair().base.toString().toLowerCase(Locale.ROOT);
    String counter = pair.getPair().counter.toString().toLowerCase(Locale.ROOT);
    return base + '_' + counter;
  }

  public static CoincheckPair stringToPair(String str) {<FILL_FUNCTION_BODY>}
}

    String sanitized = str.replace("_", "");
    CurrencyPair pair = CurrencyPairDeserializer.getCurrencyPairFromString(sanitized);
    return new CoincheckPair(pair);
  
<no_super_class>