class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: B = None
        self.v: C = None
        self.z: H = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: I = None
        self.t: J = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.y: F = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.t: C = None
        self.w: E = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: A = None
        self.q: F = None
        self.w: C = None
        self.y: H = None
        self.p: E = None
        self.t: C = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: I = None
        self.t: J = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.y: F = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.t: C = None
        self.w: E = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: A = None
        self.q: F = None
        self.w: C = None
        self.y: H = None
        self.p: E = None
        self.t: C = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

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