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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.v: G = None
        self.q: C = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.v: G = None
        self.q: C = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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