class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: I = None
        self.q: D = None
        self.w: C = None
        self.s: I = None
        self.v: E = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.v: I = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: I = None
        self.w: I = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: J = None
        self.s: E = None
        self.u: D = None
        self.w: A = None
        self.v: B = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.v: I = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: I = None
        self.w: I = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: J = None
        self.s: E = None
        self.u: D = None
        self.w: A = None
        self.v: B = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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