class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: D = None
        self.w: C = None
        self.x: E = None
        self.t: G = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.y: D = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.y: D = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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