package main

import (
	"fmt"
)

func main() {
	// str1()
	digit1()
}

func str1() {
	var s, ns string
	fmt.Scan(&s)
	for i, val := range s {
		ns += string(val)
		if i != len(s)-1 {
			ns += string('*')
		}
	}
	fmt.Println(ns)
}

func digit1() {
	var s string
	fmt.Scan(&s)
	max := s[0]

	for i := 1; i < len(s); i++ {
		if s[i] > max {
			max = s[i]
		}
	}

	fmt.Println(string(max))
}
