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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.z: J = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: J = None
        self.q: B = None
        self.v: E = None
        self.o: I = None
        self.r: E = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.o: H = None
        self.w: H = None
        self.x: G = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.z: J = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: J = None
        self.q: B = None
        self.v: E = None
        self.o: I = None
        self.r: E = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.o: H = None
        self.w: H = None
        self.x: G = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

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