import java.util.Random


class Robot {
    var name: String = generateName()

    fun reset(){
        name = generateName()
    }

    private fun generateName(): String{
        var nameString: String = ""
        nameString += generateRandomString(1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
        nameString += generateRandomString(2, "0123456789")
        return nameString
    }

    private fun generateRandomString(length: Int, charList: String): String{
        var returnString: String = ""
        val rng: Random = Random()
        for (i in (0..length)){
            returnString += charList[rng.nextInt().coerceAtLeast(0).rem(charList.length)]
        }
        return returnString
    }


}