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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.p: E = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

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

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

c = A("c")
k = B("k")
e = C("e")
i = D("i")
l = E("l")
f = A("f")
d = A("d")
g = E("g")

c.y = k
c.w = k
c.o = k
c.u = k
c.v = i
k.y = c
k.s = c
k.r = e
k.q = i
e.z = k
e.s = k
e.w = k
e.p = g
e.y = g
i.q = g
i.y = g
i.u = e
i.t = k
l.p = f
l.u = g
l.v = g
f.y = k
f.w = k
f.o = k
f.u = k
f.v = i
d.y = k
d.w = k
d.o = k
d.u = k
d.v = i
g.p = c
g.u = l
g.v = l
assert g.u.p.o.r.p.p.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: B = None
        self.o: B = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.p: E = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

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

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

c = A("c")
k = B("k")
e = C("e")
i = D("i")
l = E("l")
f = A("f")
d = A("d")
g = E("g")

c.y = k
c.w = k
c.o = k
c.u = k
c.v = i
k.y = c
k.s = c
k.r = e
k.q = i
e.z = k
e.s = k
e.w = k
e.p = g
e.y = g
i.q = g
i.y = g
i.u = e
i.t = k
l.p = f
l.u = g
l.v = g
f.y = k
f.w = k
f.o = k
f.u = k
f.v = i
d.y = k
d.w = k
d.o = k
d.u = k
d.v = i
g.p = c
g.u = l
g.v = l
assert g.u.p.o.r.p.p.v.y.txt == "g"