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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: G = None
        self.z: D = None
        self.p: E = None
        self.y: B = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: E = None
        self.x: B = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: G = None
        self.z: D = None
        self.p: E = None
        self.y: B = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: E = None
        self.x: B = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

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