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

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

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

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

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

f = A("f")
d = B("d")
n = C("n")
i = D("i")
a = E("a")
k = E("k")
g = A("g")
j = D("j")

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

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

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

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

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

f = A("f")
d = B("d")
n = C("n")
i = D("i")
a = E("a")
k = E("k")
g = A("g")
j = D("j")

f.y = i
f.s = a
f.t = g
f.o = j
f.v = k
d.v = k
d.u = n
n.p = a
i.o = a
i.v = j
a.r = n
a.v = j
a.s = k
k.r = n
k.v = i
k.s = a
g.y = j
g.o = j
g.s = a
g.t = f
g.v = k
j.o = k
j.v = i
assert i.o.r.p.s.s.r.p.txt == "a"