class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: G = None
        self.w: H = None
        self.y: I = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: D = None
        self.z: J = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: G = None
        self.w: H = None
        self.y: I = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: D = None
        self.z: J = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

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

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

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

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