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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: I = None
        self.r: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.o: G = None
        self.t: C = None
        self.y: J = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: I = None
        self.r: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.o: G = None
        self.t: C = None
        self.y: J = None
        self.r: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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