class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.y: G = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: B = None
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: J = None
        self.y: F = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.y: G = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: B = None
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: J = None
        self.y: F = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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