class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: H = None
        self.t: F = None
        self.y: E = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: B = None
        self.v: D = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: I = None
        self.x: G = None
        self.t: B = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.w: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: B = None
        self.v: D = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: I = None
        self.x: G = None
        self.t: B = None
        self.y: F = None
        self.txt = txt

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

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