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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: H = None
        self.r: A = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: A = None
        self.y: F = None
        self.o: F = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.z: D = None
        self.t: G = None
        self.o: E = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: H = None
        self.r: A = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: A = None
        self.y: F = None
        self.o: F = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.z: D = None
        self.t: G = None
        self.o: E = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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