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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: H = None
        self.u: D = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: G = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: B = None
        self.v: I = None
        self.o: D = None
        self.s: C = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.t: E = None
        self.s: I = None
        self.o: F = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: F = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: H = None
        self.u: D = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: G = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: B = None
        self.v: I = None
        self.o: D = None
        self.s: C = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.t: E = None
        self.s: I = None
        self.o: F = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: F = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

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

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