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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

e = A("e")
i = B("i")
n = C("n")
k = D("k")
c = E("c")
j = D("j")
f = A("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

e = A("e")
i = B("i")
n = C("n")
k = D("k")
c = E("c")
j = D("j")
f = A("f")

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