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

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

g.o = b
g.q = d
g.w = c
g.v = k
g.y = i
l.v = k
l.t = k
l.z = i
l.w = c
b.q = j
b.v = a
b.w = c
k.s = h
c.q = b
c.s = b
c.o = k
j.o = b
j.q = g
j.w = c
j.v = h
j.y = l
a.q = b
a.s = b
a.o = h
d.o = b
d.q = g
d.w = a
d.v = k
d.y = l
i.v = h
i.t = h
i.z = l
i.w = a
h.s = k
assert c.o.s.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: A = None
        self.w: E = None
        self.v: D = None
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

g.o = b
g.q = d
g.w = c
g.v = k
g.y = i
l.v = k
l.t = k
l.z = i
l.w = c
b.q = j
b.v = a
b.w = c
k.s = h
c.q = b
c.s = b
c.o = k
j.o = b
j.q = g
j.w = c
j.v = h
j.y = l
a.q = b
a.s = b
a.o = h
d.o = b
d.q = g
d.w = a
d.v = k
d.y = l
i.v = h
i.t = h
i.z = l
i.w = a
h.s = k
assert c.o.s.s.s.txt == "h"