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

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

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

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

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

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

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

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

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

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

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

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

h.p = l
h.u = e
h.w = d
h.y = a
h.v = a
d.t = l
d.r = n
j.t = d
j.y = d
j.w = d
j.p = a
j.x = l
l.r = g
n.t = l
n.w = k
n.p = g
n.u = e
n.z = h
a.p = l
a.u = n
a.w = d
a.y = h
a.v = h
k.t = d
k.y = d
k.w = d
k.p = h
k.x = l
e.t = l
e.w = k
e.p = n
e.u = n
e.z = h
g.t = l
g.w = j
g.p = n
g.u = n
g.z = h
assert g.p.p.u.p.t.txt == "l"