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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: E = None
        self.t: I = None
        self.x: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: F = None
        self.v: C = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: J = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: E = None
        self.p: J = None
        self.q: C = None
        self.w: G = None
        self.z: G = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: E = None
        self.t: I = None
        self.x: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: F = None
        self.v: C = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: J = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: E = None
        self.p: J = None
        self.q: C = None
        self.w: G = None
        self.z: G = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

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

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