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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.r: C = None
        self.s: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.r: C = None
        self.s: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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