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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.y: C = None
        self.r: D = None
        self.w: E = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: F = None
        self.r: A = None
        self.z: B = None
        self.s: G = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: D = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.y: C = None
        self.r: D = None
        self.w: E = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: F = None
        self.r: A = None
        self.z: B = None
        self.s: G = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: D = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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