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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: D = None
        self.p: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: D = None
        self.p: I = None
        self.txt = txt

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

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