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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.v: F = None
        self.w: C = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.v: F = None
        self.w: C = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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