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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.y: D = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.y: D = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

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

k.o = h
k.t = n
k.u = n
k.v = n
a.r = n
a.x = h
a.v = c
d.y = g
d.p = f
d.t = k
l.o = n
l.s = n
l.x = h
l.p = c
l.y = g
n.v = k
n.q = a
n.u = a
n.y = g
n.p = l
f.y = g
f.p = h
f.t = k
g.o = n
g.s = n
g.x = d
g.p = c
g.y = l
i.r = n
i.x = h
i.v = c
c.o = h
c.t = n
c.u = n
c.v = n
h.y = l
h.p = d
h.t = c
assert k.u.v.o.y.y.p.v.txt == "n"