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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.s: J = None
        self.t: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.s: J = None
        self.t: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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