class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: B = None
        self.x: G = None
        self.o: C = None
        self.t: C = None
        self.p: F = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.q: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: B = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

c = A("c")
i = B("i")
j = C("j")
n = D("n")
m = E("m")
l = F("l")
f = G("f")
k = H("k")
a = H("a")
g = E("g")

c.z = j
c.o = j
c.t = j
c.u = i
c.x = f
c.q = f
c.p = l
i.v = f
j.t = m
j.s = n
n.p = i
n.o = c
n.q = l
n.s = f
m.w = l
l.o = c
l.u = i
l.t = n
l.y = g
f.x = i
f.w = i
f.z = l
f.y = j
k.z = f
a.z = f
g.w = l
assert a.z.z.o.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: B = None
        self.x: G = None
        self.o: C = None
        self.t: C = None
        self.p: F = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.q: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: B = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

c = A("c")
i = B("i")
j = C("j")
n = D("n")
m = E("m")
l = F("l")
f = G("f")
k = H("k")
a = H("a")
g = E("g")

c.z = j
c.o = j
c.t = j
c.u = i
c.x = f
c.q = f
c.p = l
i.v = f
j.t = m
j.s = n
n.p = i
n.o = c
n.q = l
n.s = f
m.w = l
l.o = c
l.u = i
l.t = n
l.y = g
f.x = i
f.w = i
f.z = l
f.y = j
k.z = f
a.z = f
g.w = l
assert a.z.z.o.x.w.txt == "i"