Expect /bash, 2 ssh login users

HI all
i need to connect to about 900 cisco routers and switch to do some configs changes. the issue i am having is that half the devices have one set of username and password and the other half have another username and password. From expect or bash script i can ssh into a device and make changes. I need a sript that will try and ssh into the device with user 1 and password, if it fails it must try and ssh with user2 name and password.

I am new to expect and bash, explination and help will greatly be appreciated.
my expect script so far:

#!/usr/bin/expect -f
# Define the input variable, this will be a routername.domain-name
        set host "x.x.x.x"                       
        set timeout 8
# Define the login credentials we will use.
        set username "xxxx" 
        set password "!xxxx123" 
        set usernamessh "eeeeee"    
        set passwordssh "eeee123" 
# Ssh to host  ip address
spawn ssh -q -o StrictHostKeyChecking=no $username@$host

expect {
  timeout { send_user "\nFailed to get password prompt\n"; exit 1 }
  eof { send_user "\nSSH failure for $hostname\n"; exit 1 }
  "*assword"
}
# Send password if ssh is succesfull
send "$password\r"
# If Prompts *# not found, return login failed
expect {
  timeout { send_user "\nLogin failed. Password incorrect.\n"; exit 1}
  "*#"
}
interact

# from here i need to add second ssh attempt to  
#login to device using the second username and password..if  
# the first ssh failed.  please help i have no idea what to do now.

Double post.

See Cisco, 2 ssh logins for expect /bash