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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

j.v = i
j.y = i
j.z = i
j.p = l
j.q = g
i.y = c
c.w = j
h.r = j
h.u = k
h.x = n
h.s = a
h.y = a
a.q = j
a.y = k
l.q = j
l.y = j
k.v = i
k.y = i
k.z = i
k.p = l
k.q = g
g.q = k
g.y = k
n.r = k
n.u = j
n.x = h
n.s = g
n.y = g
assert i.y.w.q.y.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.q: E = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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