class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: D = None
        self.s: E = None
        self.q: J = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.t: G = None
        self.x: A = None
        self.z: H = None
        self.w: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: I = None
        self.v: B = None
        self.s: H = None
        self.o: E = None
        self.w: B = None
        self.t: F = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.x: F = None
        self.o: A = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.x: F = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.t: G = None
        self.x: A = None
        self.z: H = None
        self.w: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: I = None
        self.v: B = None
        self.s: H = None
        self.o: E = None
        self.w: B = None
        self.t: F = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.x: F = None
        self.o: A = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.x: F = None
        self.r: I = None
        self.txt = txt

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

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