class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: C = None
        self.r: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: J = None
        self.q: H = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.u: A = None
        self.y: B = None
        self.v: A = None
        self.r: I = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.r: H = None
        self.v: H = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: G = None
        self.z: G = None
        self.x: F = None
        self.v: D = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: J = None
        self.q: H = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: A = None
        self.u: A = None
        self.y: B = None
        self.v: A = None
        self.r: I = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.r: H = None
        self.v: H = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: G = None
        self.z: G = None
        self.x: F = None
        self.v: D = None
        self.s: B = None
        self.txt = txt

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

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