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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: J = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.o: J = None
        self.z: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: J = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.o: J = None
        self.z: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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