import java.math.BigInteger
fun main() {
val bigInt = BigInteger("12345678901234567890123456789012")
// Get the last digit using modulo 10
val lastDigit = bigInt % BigInteger.TEN
println("The last digit is: $lastDigit")
}
/*
run:
The last digit is: 2
*/