class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.v: A = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.p: D = None
        self.u: C = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.v: A = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.p: D = None
        self.u: C = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

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

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