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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: I = None
        self.y: B = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: A = None
        self.y: I = None
        self.s: B = None
        self.p: I = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: C = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: E = None
        self.o: D = None
        self.t: G = None
        self.p: F = None
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: G = None
        self.t: A = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: I = None
        self.y: B = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: A = None
        self.y: I = None
        self.s: B = None
        self.p: I = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: C = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: E = None
        self.o: D = None
        self.t: G = None
        self.p: F = None
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: G = None
        self.t: A = None
        self.v: F = None
        self.txt = txt

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

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