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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.y: H = None
        self.u: B = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: I = None
        self.u: D = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: F = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: D = None
        self.t: B = None
        self.x: F = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.y: H = None
        self.u: B = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: I = None
        self.u: D = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: F = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: D = None
        self.t: B = None
        self.x: F = None
        self.w: D = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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