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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: H = None
        self.o: J = None
        self.s: I = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.x: G = None
        self.w: H = None
        self.p: F = None
        self.r: C = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: H = None
        self.o: J = None
        self.s: I = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.x: G = None
        self.w: H = None
        self.p: F = None
        self.r: C = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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