class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.v: F = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

k.y = c
k.t = n
k.u = n
k.v = b
k.q = a
j.q = l
a.v = f
a.w = n
a.z = n
a.o = b
a.q = c
f.o = l
f.v = j
f.y = j
f.p = b
n.v = f
b.z = k
l.r = j
l.q = n
e.z = j
e.r = n
e.o = n
e.u = h
e.w = h
e.y = f
e.t = f
c.y = k
c.t = n
c.u = n
c.v = h
c.q = a
h.z = c
assert b.z.v.z.q.v.y.q.txt == "l"