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

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

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

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

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

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

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

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

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

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

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

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

g.y = l
g.z = c
g.u = c
g.q = j
g.r = d
f.o = g
f.w = c
j.z = a
j.p = a
j.y = c
j.q = d
j.w = d
a.w = c
a.y = d
a.v = n
n.p = g
n.z = d
n.w = l
n.r = h
n.y = b
b.z = a
b.p = a
b.w = a
b.y = g
b.q = d
h.p = g
h.z = a
h.w = n
h.r = n
h.y = b
l.p = c
l.z = a
l.w = h
l.r = n
l.y = b
c.y = h
c.z = g
c.u = g
c.q = b
c.r = a
d.w = g
d.y = a
d.v = h
assert h.w.y.y.r.w.u.txt == "c"