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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.z: D = None
        self.txt = txt

i = A("i")
g = B("g")
l = C("l")
j = D("j")
m = E("m")
a = C("a")
n = D("n")
b = B("b")
k = E("k")

i.v = l
i.u = n
i.x = a
g.v = l
g.w = j
l.s = n
l.y = k
l.u = j
l.p = i
j.z = n
j.r = b
j.u = g
j.o = k
m.q = i
m.u = n
m.z = n
a.s = n
a.y = k
a.u = j
a.p = i
n.z = j
n.r = b
n.u = b
n.o = k
b.v = a
b.w = j
k.q = i
k.u = n
k.z = n
assert k.q.x.p.u.o.z.o.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.z: D = None
        self.txt = txt

i = A("i")
g = B("g")
l = C("l")
j = D("j")
m = E("m")
a = C("a")
n = D("n")
b = B("b")
k = E("k")

i.v = l
i.u = n
i.x = a
g.v = l
g.w = j
l.s = n
l.y = k
l.u = j
l.p = i
j.z = n
j.r = b
j.u = g
j.o = k
m.q = i
m.u = n
m.z = n
a.s = n
a.y = k
a.u = j
a.p = i
n.z = j
n.r = b
n.u = b
n.o = k
b.v = a
b.w = j
k.q = i
k.u = n
k.z = n
assert k.q.x.p.u.o.z.o.z.o.txt == "k"