object Test extends App {
  println(f"%")
  println(f"%%")
  println(f"%%%")
  println(f"%%%%")
  println(f"%%%%%")
  println(f"%%%%%%")

  println(f"%%n")
  println(f"%%%n")
  println(f"%%%%n")
  println(f"%%%%%n")
  println(f"%%%%%%n")
  println(f"%%%%%%%n")

  println(f"${0}%")
  println(f"${0}%d")
  println(f"${0}%%d")
  println(f"${0}%%%d")
  println(f"${0}%%%%d")
  println(f"${0}%%%%%d")

  println(f"${0}%n")
  println(f"${0}%d%n")
}