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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: A = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: C = None
        self.z: C = None
        self.x: J = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: D = None
        self.s: A = None
        self.u: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: H = None
        self.z: B = None
        self.y: H = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: C = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: J = None
        self.p: C = None
        self.r: G = None
        self.u: D = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.w: I = None
        self.q: E = None
        self.v: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: A = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: C = None
        self.z: C = None
        self.x: J = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: D = None
        self.s: A = None
        self.u: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: H = None
        self.z: B = None
        self.y: H = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: C = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: J = None
        self.p: C = None
        self.r: G = None
        self.u: D = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.w: I = None
        self.q: E = None
        self.v: I = None
        self.txt = txt

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

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