class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: G = None
        self.v: F = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: I = None
        self.o: A = None
        self.q: D = None
        self.y: J = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: B = None
        self.v: D = None
        self.x: J = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.z: F = None
        self.p: F = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: I = None
        self.o: A = None
        self.q: D = None
        self.y: J = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: B = None
        self.v: D = None
        self.x: J = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.z: F = None
        self.p: F = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

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

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