class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.z: E = None
        self.y: D = None
        self.v: J = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.w: E = None
        self.o: E = None
        self.y: C = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.y: G = None
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: I = None
        self.y: I = None
        self.s: E = None
        self.w: E = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

f = A("f")
c = B("c")
e = C("e")
h = D("h")
n = E("n")
i = F("i")
m = G("m")
d = H("d")
b = I("b")
k = J("k")

f.w = e
f.s = m
f.z = n
f.y = h
f.v = k
f.t = b
c.v = f
c.x = d
c.w = n
c.o = n
c.y = e
c.q = m
e.x = h
e.r = k
h.w = f
h.p = n
h.y = m
h.z = e
h.v = i
n.o = h
n.y = i
n.r = i
n.x = b
n.v = b
n.t = b
n.u = c
i.s = f
m.r = b
m.u = b
m.y = b
m.s = n
m.w = n
m.z = f
m.o = e
d.v = c
b.z = h
b.t = h
b.u = k
b.o = c
b.q = n
b.x = m
k.u = e
assert i.s.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.z: E = None
        self.y: D = None
        self.v: J = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.w: E = None
        self.o: E = None
        self.y: C = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.y: G = None
        self.z: C = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: I = None
        self.y: I = None
        self.s: E = None
        self.w: E = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

f = A("f")
c = B("c")
e = C("e")
h = D("h")
n = E("n")
i = F("i")
m = G("m")
d = H("d")
b = I("b")
k = J("k")

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