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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: D = None
        self.u: D = None
        self.t: F = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: D = None
        self.u: D = None
        self.t: F = None
        self.w: E = None
        self.txt = txt

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

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