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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: H = None
        self.r: H = None
        self.p: E = None
        self.v: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.u: A = None
        self.r: A = None
        self.w: H = None
        self.s: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: F = None
        self.w: B = None
        self.u: C = None
        self.v: E = None
        self.z: E = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: H = None
        self.r: H = None
        self.p: E = None
        self.v: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.u: A = None
        self.r: A = None
        self.w: H = None
        self.s: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: F = None
        self.w: B = None
        self.u: C = None
        self.v: E = None
        self.z: E = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

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

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

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