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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: A = None
        self.o: B = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

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

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

d = A("d")
c = B("c")
g = C("g")
n = D("n")
e = E("e")
k = C("k")
m = D("m")
j = D("j")
b = B("b")

d.r = e
d.p = e
d.w = e
c.v = e
c.w = d
c.y = n
g.t = k
g.x = d
g.o = c
g.v = c
g.u = b
n.p = m
n.x = m
n.o = b
n.t = g
n.w = d
e.u = d
e.z = d
e.w = d
e.r = d
e.o = k
k.t = g
k.x = d
k.o = b
k.v = b
k.u = c
m.p = n
m.x = n
m.o = b
m.t = k
m.w = d
j.p = m
j.x = m
j.o = c
j.t = g
j.w = d
b.v = e
b.w = d
b.y = n
assert e.z.r.u.r.w.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: A = None
        self.o: B = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

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

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

d = A("d")
c = B("c")
g = C("g")
n = D("n")
e = E("e")
k = C("k")
m = D("m")
j = D("j")
b = B("b")

d.r = e
d.p = e
d.w = e
c.v = e
c.w = d
c.y = n
g.t = k
g.x = d
g.o = c
g.v = c
g.u = b
n.p = m
n.x = m
n.o = b
n.t = g
n.w = d
e.u = d
e.z = d
e.w = d
e.r = d
e.o = k
k.t = g
k.x = d
k.o = b
k.v = b
k.u = c
m.p = n
m.x = n
m.o = b
m.t = k
m.w = d
j.p = m
j.x = m
j.o = c
j.t = g
j.w = d
b.v = e
b.w = d
b.y = n
assert e.z.r.u.r.w.p.o.txt == "k"