class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

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