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

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

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: F = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: A = None
        self.z: E = None
        self.w: D = None
        self.q: E = None
        self.r: I = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: F = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: A = None
        self.z: E = None
        self.w: D = None
        self.q: E = None
        self.r: I = None
        self.v: B = None
        self.txt = txt

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

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