how do you accesses the properties of an object in another scene? Here is what my code looks like.:

scene =bge.logic.getCurrentScene()
S = cont.actuators['s']
print('now')

scenes = beg.logic.getSceneList()
for scene in scenes:
    if scene.name ==  'scene':
        back = scene.objects['back']
        print("here")

if 1==1:
    back ['phase'] =2
    print('baby')
    S.activate


The only printed command is 'here' and I get an error that says I referenced 'back' before I assigned it. I'm trying to change a property called 'phase' that is on an object called 'back'. 'S' is an actuator that ends the overlay scene that the python running object called 'cube' is on. The scene is already loaded so that is not the problem. I'm just not sure where to go from here.
Thanks fam, I found the code in another question. 

import bge
from bge import logic

for scene in logic.getSceneList():
    if scene.name == 'ground':
        ground = scene

Back = ground.objects['back']

Back ['phase'] =3


This works to change back's property from another scene