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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.y: A = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.y: A = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.txt = txt

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

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