class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: B = None
        self.s: J = None
        self.t: F = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: E = None
        self.o: E = None
        self.v: G = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: G = None
        self.q: D = None
        self.r: J = None
        self.z: I = None
        self.t: A = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: E = None
        self.o: E = None
        self.v: G = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: G = None
        self.q: D = None
        self.r: J = None
        self.z: I = None
        self.t: A = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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