object Problem {

  def main(args: Array[String]): Unit = {

    List.range(1, 101).map(x => func(x)).map(x => println(x))

  }

  

  def func(x: Integer) = (x % 5, x % 3, x) match {

      case (0, 0, _) => "C"

      case (0, _, _) => "B"

      case (_, 0, _) => "A"

      case _ => x.toString

  }

}