class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.t: A = None
        self.p: E = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.x: F = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.p: C = None
        self.v: C = None
        self.t: C = None
        self.q: H = None
        self.txt = txt

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

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

i = A("i")
k = B("k")
b = C("b")
a = D("a")
m = E("m")
c = F("c")
e = G("e")
l = H("l")

i.z = a
k.w = e
k.z = b
k.o = b
k.t = i
k.p = m
k.v = c
b.r = k
b.v = c
b.p = m
a.q = k
a.p = m
a.y = m
a.x = c
a.v = i
m.u = b
m.x = l
c.s = k
c.o = m
c.p = b
c.v = b
c.t = b
c.q = l
e.o = a
e.z = l
e.t = k
e.p = c
l.q = e
l.s = m
l.p = i
assert i.z.q.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: C = None
        self.t: A = None
        self.p: E = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.x: F = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.p: C = None
        self.v: C = None
        self.t: C = None
        self.q: H = None
        self.txt = txt

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

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

i = A("i")
k = B("k")
b = C("b")
a = D("a")
m = E("m")
c = F("c")
e = G("e")
l = H("l")

i.z = a
k.w = e
k.z = b
k.o = b
k.t = i
k.p = m
k.v = c
b.r = k
b.v = c
b.p = m
a.q = k
a.p = m
a.y = m
a.x = c
a.v = i
m.u = b
m.x = l
c.s = k
c.o = m
c.p = b
c.v = b
c.t = b
c.q = l
e.o = a
e.z = l
e.t = k
e.p = c
l.q = e
l.s = m
l.p = i
assert i.z.q.w.p.txt == "c"