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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.w: B = None
        self.s: E = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.w: B = None
        self.s: E = None
        self.p: D = None
        self.txt = txt

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

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

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