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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.p: D = None
        self.r: F = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.x: E = None
        self.v: A = None
        self.o: E = None
        self.s: D = None
        self.q: F = None
        self.txt = txt

l = A("l")
h = B("h")
d = C("d")
a = D("a")
n = E("n")
g = F("g")
f = G("f")
k = H("k")
m = G("m")

l.x = h
l.u = g
h.y = m
h.u = m
h.o = k
h.z = k
h.t = f
h.v = a
h.p = g
h.s = g
d.x = n
d.v = a
d.t = a
d.y = a
d.z = h
d.q = h
a.y = m
n.o = f
n.s = g
n.r = g
n.p = a
n.z = a
n.t = m
g.x = k
f.y = l
f.p = l
f.z = l
f.x = a
f.t = d
f.u = h
f.q = m
k.r = l
k.v = l
k.u = a
k.s = a
k.x = n
k.o = n
k.q = g
m.y = l
m.p = l
m.z = l
m.x = a
m.t = d
m.u = h
m.q = f
assert l.u.x.x.o.q.t.x.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.p: D = None
        self.r: F = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: D = None
        self.x: E = None
        self.v: A = None
        self.o: E = None
        self.s: D = None
        self.q: F = None
        self.txt = txt

l = A("l")
h = B("h")
d = C("d")
a = D("a")
n = E("n")
g = F("g")
f = G("f")
k = H("k")
m = G("m")

l.x = h
l.u = g
h.y = m
h.u = m
h.o = k
h.z = k
h.t = f
h.v = a
h.p = g
h.s = g
d.x = n
d.v = a
d.t = a
d.y = a
d.z = h
d.q = h
a.y = m
n.o = f
n.s = g
n.r = g
n.p = a
n.z = a
n.t = m
g.x = k
f.y = l
f.p = l
f.z = l
f.x = a
f.t = d
f.u = h
f.q = m
k.r = l
k.v = l
k.u = a
k.s = a
k.x = n
k.o = n
k.q = g
m.y = l
m.p = l
m.z = l
m.x = a
m.t = d
m.u = h
m.q = f
assert l.u.x.x.o.q.t.x.r.x.txt == "k"