class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: F = None
        self.y: D = None
        self.v: H = None
        self.p: G = None
        self.u: H = None
        self.t: H = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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