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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: J = None
        self.r: G = None
        self.v: G = None
        self.w: A = None
        self.x: G = None
        self.s: E = None
        self.z: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: J = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: J = None
        self.r: G = None
        self.v: G = None
        self.w: A = None
        self.x: G = None
        self.s: E = None
        self.z: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: J = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

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

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