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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: D = None
        self.s: D = None
        self.t: D = None
        self.o: G = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.t: F = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: G = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: D = None
        self.s: D = None
        self.t: D = None
        self.o: G = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.t: F = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: G = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

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

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