class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: A = None
        self.p: D = None
        self.t: C = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

k.v = b
k.u = b
k.p = e
k.t = f
k.o = a
c.y = i
c.t = e
c.r = a
c.q = a
i.v = f
i.u = f
i.r = j
e.p = j
n.o = i
b.v = k
b.u = k
b.p = e
b.t = i
b.o = a
a.p = j
j.o = i
m.y = f
m.t = a
m.r = a
m.q = a
f.v = i
f.u = i
f.r = n
assert i.u.r.o.v.r.o.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: A = None
        self.p: D = None
        self.t: C = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

k.v = b
k.u = b
k.p = e
k.t = f
k.o = a
c.y = i
c.t = e
c.r = a
c.q = a
i.v = f
i.u = f
i.r = j
e.p = j
n.o = i
b.v = k
b.u = k
b.p = e
b.t = i
b.o = a
a.p = j
j.o = i
m.y = f
m.t = a
m.r = a
m.q = a
f.v = i
f.u = i
f.r = n
assert i.u.r.o.v.r.o.r.o.txt == "i"