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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: A = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.u: G = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: A = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.u: G = None
        self.v: G = None
        self.txt = txt

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

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