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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.y: B = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: I = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.z: A = None
        self.w: A = None
        self.v: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.y: B = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: I = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.z: A = None
        self.w: A = None
        self.v: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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