class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.r: D = None
        self.q: A = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

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

c.u = h
c.x = h
c.q = h
c.r = m
c.z = n
g.q = e
g.w = c
g.o = f
n.q = l
n.o = m
n.r = f
m.w = g
m.x = e
m.p = e
m.r = e
m.q = n
e.p = n
e.o = n
e.u = a
a.w = l
a.x = e
a.p = e
a.r = e
a.q = n
j.q = l
j.o = a
j.r = f
f.q = g
f.o = m
f.r = j
h.u = c
h.x = c
h.q = c
h.r = a
h.z = f
l.q = e
l.w = c
l.o = f
assert e.o.r.r.o.w.o.q.q.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: A = None
        self.r: D = None
        self.q: A = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

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

c.u = h
c.x = h
c.q = h
c.r = m
c.z = n
g.q = e
g.w = c
g.o = f
n.q = l
n.o = m
n.r = f
m.w = g
m.x = e
m.p = e
m.r = e
m.q = n
e.p = n
e.o = n
e.u = a
a.w = l
a.x = e
a.p = e
a.r = e
a.q = n
j.q = l
j.o = a
j.r = f
f.q = g
f.o = m
f.r = j
h.u = c
h.x = c
h.q = c
h.r = a
h.z = f
l.q = e
l.w = c
l.o = f
assert e.o.r.r.o.w.o.q.q.u.r.txt == "e"