class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: G = None
        self.u: G = None
        self.q: E = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: E = None
        self.s: H = None
        self.t: A = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.z: H = None
        self.q: A = None
        self.u: C = None
        self.v: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.o: G = None
        self.u: H = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.q: H = None
        self.r: B = None
        self.z: F = None
        self.s: G = None
        self.u: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: A = None
        self.r: C = None
        self.z: E = None
        self.txt = txt

e = A("e")
f = B("f")
k = C("k")
d = D("d")
l = E("l")
h = F("h")
b = G("b")
a = H("a")
j = G("j")
c = A("c")

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: E = None
        self.s: H = None
        self.t: A = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.z: H = None
        self.q: A = None
        self.u: C = None
        self.v: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.o: G = None
        self.u: H = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.q: H = None
        self.r: B = None
        self.z: F = None
        self.s: G = None
        self.u: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: A = None
        self.r: C = None
        self.z: E = None
        self.txt = txt

e = A("e")
f = B("f")
k = C("k")
d = D("d")
l = E("l")
h = F("h")
b = G("b")
a = H("a")
j = G("j")
c = A("c")

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