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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.s: D = None
        self.v: A = None
        self.p: C = None
        self.q: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.y: C = None
        self.r: D = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.s: D = None
        self.v: A = None
        self.p: C = None
        self.q: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.y: C = None
        self.r: D = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

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