class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: C = None
        self.o: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: F = None
        self.r: I = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.t: C = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: C = None
        self.z: G = None
        self.o: F = None
        self.q: H = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: F = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.w: I = None
        self.z: A = None
        self.x: F = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: F = None
        self.r: I = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.t: C = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: C = None
        self.z: G = None
        self.o: F = None
        self.q: H = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: F = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.w: I = None
        self.z: A = None
        self.x: F = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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