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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

d.q = b
d.t = k
d.u = i
d.p = l
d.w = h
k.t = e
b.y = i
b.v = i
b.t = i
b.u = i
b.r = k
l.y = h
l.q = c
l.u = b
l.r = k
l.p = e
c.v = k
c.w = b
c.t = b
i.y = b
i.v = b
i.t = b
i.u = b
i.r = k
e.v = k
e.w = i
e.t = b
h.y = l
h.q = e
h.u = i
h.r = k
h.p = c
assert i.u.t.r.t.w.y.y.r.txt == "k"