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

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

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

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

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

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

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

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

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

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

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

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

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