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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.r: B = None
        self.p: C = None
        self.z: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.t: H = None
        self.v: C = None
        self.r: C = None
        self.p: H = None
        self.u: F = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: C = None
        self.u: G = None
        self.w: A = None
        self.v: A = None
        self.r: A = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: H = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.r: B = None
        self.p: C = None
        self.z: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.t: H = None
        self.v: C = None
        self.r: C = None
        self.p: H = None
        self.u: F = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: C = None
        self.u: G = None
        self.w: A = None
        self.v: A = None
        self.r: A = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: H = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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