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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.u: A = None
        self.t: C = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.v: G = None
        self.y: C = None
        self.r: A = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.u: A = None
        self.t: C = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.v: G = None
        self.y: C = None
        self.r: A = None
        self.w: C = None
        self.txt = txt

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

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