class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.u: G = None
        self.x: C = None
        self.v: D = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: C = None
        self.v: C = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.y: E = None
        self.o: A = None
        self.z: A = None
        self.x: J = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.z: A = None
        self.q: D = None
        self.p: F = None
        self.t: C = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.q: G = None
        self.t: J = None
        self.o: E = None
        self.y: H = None
        self.v: G = None
        self.x: C = None
        self.w: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: C = None
        self.v: C = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.y: E = None
        self.o: A = None
        self.z: A = None
        self.x: J = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.z: A = None
        self.q: D = None
        self.p: F = None
        self.t: C = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: B = None
        self.q: G = None
        self.t: J = None
        self.o: E = None
        self.y: H = None
        self.v: G = None
        self.x: C = None
        self.w: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

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

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