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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: C = None
        self.s: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.t: F = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.y: F = None
        self.t: B = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: C = None
        self.s: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.t: F = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.y: F = None
        self.t: B = None
        self.w: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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