class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: J = None
        self.q: I = None
        self.o: D = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: I = None
        self.o: H = None
        self.t: F = None
        self.z: H = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.o: F = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: J = None
        self.q: I = None
        self.o: D = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: I = None
        self.o: H = None
        self.t: F = None
        self.z: H = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.o: F = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

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

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

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