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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: B = None
        self.z: C = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: B = None
        self.z: C = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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