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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: I = None
        self.w: B = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: D = None
        self.y: E = None
        self.x: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: C = None
        self.s: D = None
        self.p: C = None
        self.u: G = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: I = None
        self.w: B = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: D = None
        self.y: E = None
        self.x: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: C = None
        self.s: D = None
        self.p: C = None
        self.u: G = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

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

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