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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.v: B = None
        self.t: C = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: E = None
        self.p: A = None
        self.x: B = None
        self.o: B = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.w: A = None
        self.q: C = None
        self.t: B = None
        self.p: B = None
        self.v: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.v: B = None
        self.t: C = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: E = None
        self.p: A = None
        self.x: B = None
        self.o: B = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.w: A = None
        self.q: C = None
        self.t: B = None
        self.p: B = None
        self.v: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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