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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: E = None
        self.u: F = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.o: C = None
        self.y: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: E = None
        self.u: F = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.o: C = None
        self.y: B = None
        self.txt = txt

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

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

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