class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.p: D = None
        self.t: G = None
        self.o: H = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.t: I = None
        self.r: I = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.x: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.v: C = None
        self.txt = txt

a = A("a")
n = B("n")
k = C("k")
c = D("c")
g = E("g")
j = F("j")
f = G("f")
d = H("d")
e = I("e")
b = I("b")

a.s = f
n.x = g
n.o = g
k.r = c
k.p = c
k.y = c
k.w = j
k.u = j
k.t = f
k.o = d
c.v = d
c.w = g
c.t = e
c.r = b
c.o = j
g.t = d
g.y = k
g.x = a
g.w = j
j.y = f
j.r = f
f.o = c
f.w = g
f.u = g
d.y = f
d.v = c
d.w = g
d.o = n
e.y = c
e.z = n
e.v = k
b.y = c
b.z = n
b.v = k
assert b.z.x.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.p: D = None
        self.t: G = None
        self.o: H = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.t: I = None
        self.r: I = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.x: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.v: C = None
        self.txt = txt

a = A("a")
n = B("n")
k = C("k")
c = D("c")
g = E("g")
j = F("j")
f = G("f")
d = H("d")
e = I("e")
b = I("b")

a.s = f
n.x = g
n.o = g
k.r = c
k.p = c
k.y = c
k.w = j
k.u = j
k.t = f
k.o = d
c.v = d
c.w = g
c.t = e
c.r = b
c.o = j
g.t = d
g.y = k
g.x = a
g.w = j
j.y = f
j.r = f
f.o = c
f.w = g
f.u = g
d.y = f
d.v = c
d.w = g
d.o = n
e.y = c
e.z = n
e.v = k
b.y = c
b.z = n
b.v = k
assert b.z.x.t.w.txt == "g"