class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.y: H = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: I = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: I = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: E = None
        self.s: F = None
        self.t: C = None
        self.y: J = None
        self.r: A = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.q: E = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: I = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: I = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: E = None
        self.s: F = None
        self.t: C = None
        self.y: J = None
        self.r: A = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.q: E = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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