class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: G = None
        self.s: C = None
        self.u: H = None
        self.v: H = None
        self.r: H = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: D = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: H = None
        self.x: I = None
        self.w: G = None
        self.q: B = None
        self.r: G = None
        self.y: E = None
        self.v: H = None
        self.u: B = None
        self.txt = txt

a = A("a")
c = B("c")
f = C("f")
j = D("j")
n = E("n")
l = F("l")
i = G("i")
m = H("m")
b = I("b")
e = J("e")

a.t = c
a.y = c
a.p = i
a.s = f
a.u = m
a.v = m
a.r = m
a.o = l
c.q = f
c.w = j
c.x = l
c.r = i
f.s = a
f.p = i
j.q = n
j.p = n
j.w = c
j.z = m
j.x = f
j.t = f
j.v = b
j.u = e
j.y = e
n.p = e
n.o = a
n.v = j
l.z = n
l.s = n
l.q = n
l.v = m
l.o = c
l.u = j
l.p = j
l.r = e
l.y = e
l.w = f
i.q = n
i.t = a
i.z = l
m.q = l
m.x = j
m.z = a
m.o = c
b.v = j
b.o = f
b.w = c
e.z = i
e.w = i
e.r = i
e.s = m
e.v = m
e.x = b
e.q = c
e.u = c
e.y = n
assert m.o.q.p.z.p.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: G = None
        self.s: C = None
        self.u: H = None
        self.v: H = None
        self.r: H = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: D = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: H = None
        self.x: I = None
        self.w: G = None
        self.q: B = None
        self.r: G = None
        self.y: E = None
        self.v: H = None
        self.u: B = None
        self.txt = txt

a = A("a")
c = B("c")
f = C("f")
j = D("j")
n = E("n")
l = F("l")
i = G("i")
m = H("m")
b = I("b")
e = J("e")

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