class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: G = None
        self.r: E = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: F = None
        self.p: H = None
        self.z: B = None
        self.o: I = None
        self.y: A = None
        self.u: H = None
        self.w: E = None
        self.r: J = None
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: A = None
        self.s: D = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: D = None
        self.p: F = None
        self.w: I = None
        self.r: D = None
        self.txt = txt

m = A("m")
f = B("f")
j = C("j")
i = D("i")
e = E("e")
l = F("l")
h = G("h")
k = H("k")
n = I("n")
d = J("d")

m.t = e
m.r = e
m.o = h
m.u = f
f.z = e
f.v = k
f.o = h
f.u = i
f.x = j
f.r = m
j.q = e
j.w = e
j.s = l
j.p = k
j.u = k
j.z = f
j.o = n
j.y = m
j.r = d
j.t = d
i.t = m
e.o = l
e.r = i
e.s = j
e.u = m
l.y = j
l.x = j
l.p = m
l.s = i
l.t = h
h.o = f
h.z = e
k.s = m
n.o = e
d.v = m
d.q = i
d.r = i
d.p = l
d.w = n
assert m.o.o.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: G = None
        self.r: E = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: F = None
        self.p: H = None
        self.z: B = None
        self.o: I = None
        self.y: A = None
        self.u: H = None
        self.w: E = None
        self.r: J = None
        self.t: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: A = None
        self.s: D = None
        self.x: C = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: D = None
        self.p: F = None
        self.w: I = None
        self.r: D = None
        self.txt = txt

m = A("m")
f = B("f")
j = C("j")
i = D("i")
e = E("e")
l = F("l")
h = G("h")
k = H("k")
n = I("n")
d = J("d")

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