Expect: How to read buffer for spawn

Hi All,

I have to write one expect script to login to one system.
I am using

set timeout -1
match_max 100000
spawn ssh root@hostname

Now when I do spawn ssh to that host it send some warning message and one challenge
Challenge: 111-2345

I need to read this challenge value and has to pass as password.

Can anyone tell me from which variable or buffer I can read output of spawn?

Thanks in advance

Regards,
Lokesh Agrawal

$expect_out(buffer)