class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: D = None
        self.w: F = None
        self.o: G = None
        self.z: F = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.r: F = None
        self.y: F = None
        self.s: H = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: H = None
        self.o: A = None
        self.r: F = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: B = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.t: D = None
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.r: F = None
        self.y: F = None
        self.s: H = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: H = None
        self.o: A = None
        self.r: F = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: B = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.t: D = None
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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