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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.t: D = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.t: D = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

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

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