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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.w: C = None
        self.q: C = None
        self.t: E = None
        self.v: C = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.q: F = None
        self.t: J = None
        self.o: I = None
        self.s: F = None
        self.p: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.p: B = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.w: C = None
        self.q: C = None
        self.t: E = None
        self.v: C = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.q: F = None
        self.t: J = None
        self.o: I = None
        self.s: F = None
        self.p: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.p: B = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

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

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