class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: E = None
        self.v: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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