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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.p: D = None
        self.o: I = None
        self.v: A = None
        self.s: B = None
        self.q: B = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.p: D = None
        self.o: I = None
        self.v: A = None
        self.s: B = None
        self.q: B = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: B = None
        self.txt = txt

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

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

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