class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: C = None
        self.s: I = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: E = None
        self.y: G = None
        self.x: H = None
        self.u: G = None
        self.q: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.u: I = None
        self.o: I = None
        self.s: I = None
        self.z: A = None
        self.r: H = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: E = None
        self.o: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: E = None
        self.y: G = None
        self.x: H = None
        self.u: G = None
        self.q: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.u: I = None
        self.o: I = None
        self.s: I = None
        self.z: A = None
        self.r: H = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: E = None
        self.o: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

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