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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.o: E = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.o: E = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

g.w = f
g.q = c
e.t = a
e.v = a
e.s = g
e.o = j
e.p = h
f.p = a
f.x = c
f.o = e
f.t = h
f.r = l
c.z = k
c.s = h
c.w = j
j.s = c
j.o = l
j.p = k
k.s = c
k.o = l
k.p = j
h.w = f
h.q = c
a.p = l
a.r = l
a.x = c
a.o = e
a.t = h
l.p = a
l.x = c
l.o = e
l.t = h
l.r = f
assert c.w.p.o.r.o.s.txt == "g"