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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: J = None
        self.w: E = None
        self.x: I = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.z: J = None
        self.y: A = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.x: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: J = None
        self.o: B = None
        self.u: D = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

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

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

m = A("m")
l = B("l")
h = C("h")
c = D("c")
g = E("g")
j = F("j")
d = G("d")
f = H("f")
a = I("a")
k = J("k")

m.y = g
m.u = j
m.o = j
m.t = k
l.y = k
l.p = c
h.r = l
h.u = k
h.w = g
h.x = a
h.s = c
c.s = j
c.t = h
c.z = k
c.y = m
c.u = a
g.o = d
g.v = l
g.x = k
j.s = f
j.o = f
j.q = f
d.w = h
d.s = h
d.v = k
d.p = k
d.z = g
d.u = g
d.x = a
d.r = j
d.t = f
d.o = m
f.s = j
f.q = k
f.o = l
f.u = c
f.w = g
f.z = h
a.p = k
a.r = f
a.w = h
k.x = f
k.w = f
k.p = d
k.o = d
k.q = g
k.u = g
k.t = m
k.r = m
k.z = a
k.y = h
assert a.p.y.w.x.z.w.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.o: F = None
        self.t: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: J = None
        self.w: E = None
        self.x: I = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.z: J = None
        self.y: A = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: B = None
        self.x: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: J = None
        self.o: B = None
        self.u: D = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

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

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

m = A("m")
l = B("l")
h = C("h")
c = D("c")
g = E("g")
j = F("j")
d = G("d")
f = H("f")
a = I("a")
k = J("k")

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