class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.x: B = None
        self.r: B = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.r: H = None
        self.o: B = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: I = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.r: H = None
        self.o: B = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: I = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

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

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

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

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