class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: C = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: A = None
        self.x: H = None
        self.q: A = None
        self.o: C = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: H = None
        self.x: C = None
        self.q: B = None
        self.p: B = None
        self.z: A = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: A = None
        self.x: H = None
        self.q: A = None
        self.o: C = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: H = None
        self.x: C = None
        self.q: B = None
        self.p: B = None
        self.z: A = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.txt = txt

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

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

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