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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: B = None
        self.w: C = None
        self.y: J = None
        self.o: C = None
        self.t: H = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: J = None
        self.u: C = None
        self.z: B = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.v: H = None
        self.p: D = None
        self.z: E = None
        self.o: G = None
        self.s: E = None
        self.r: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: B = None
        self.w: C = None
        self.y: J = None
        self.o: C = None
        self.t: H = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: J = None
        self.u: C = None
        self.z: B = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.v: H = None
        self.p: D = None
        self.z: E = None
        self.o: G = None
        self.s: E = None
        self.r: A = None
        self.y: A = None
        self.txt = txt

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

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