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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

c = A("c")
g = B("g")
a = C("a")
n = D("n")
d = E("d")
k = D("k")
j = C("j")

c.t = d
g.r = c
g.w = c
g.t = c
a.v = g
a.r = c
a.t = k
a.y = d
a.u = j
n.w = c
n.z = k
n.y = k
n.t = k
d.y = a
d.q = c
d.u = g
d.w = k
k.w = c
k.z = n
k.y = n
k.t = n
j.v = g
j.r = c
j.t = k
j.y = d
j.u = a
assert n.y.w.t.y.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

c = A("c")
g = B("g")
a = C("a")
n = D("n")
d = E("d")
k = D("k")
j = C("j")

c.t = d
g.r = c
g.w = c
g.t = c
a.v = g
a.r = c
a.t = k
a.y = d
a.u = j
n.w = c
n.z = k
n.y = k
n.t = k
d.y = a
d.q = c
d.u = g
d.w = k
k.w = c
k.z = n
k.y = n
k.t = n
j.v = g
j.r = c
j.t = k
j.y = d
j.u = a
assert n.y.w.t.y.t.y.txt == "n"