class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

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

c.x = g
i.y = j
i.r = j
i.q = b
d.t = l
d.o = f
d.y = j
d.s = m
a.v = l
a.y = l
a.p = i
a.o = f
a.w = g
j.v = d
j.p = d
j.x = m
j.s = m
j.r = a
l.v = a
l.y = a
l.p = i
l.o = f
l.w = g
b.x = g
g.t = l
g.o = i
g.y = j
g.s = d
f.y = j
f.r = j
f.q = c
m.t = a
m.o = f
m.y = j
m.s = g
assert d.o.r.r.y.o.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

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

c.x = g
i.y = j
i.r = j
i.q = b
d.t = l
d.o = f
d.y = j
d.s = m
a.v = l
a.y = l
a.p = i
a.o = f
a.w = g
j.v = d
j.p = d
j.x = m
j.s = m
j.r = a
l.v = a
l.y = a
l.p = i
l.o = f
l.w = g
b.x = g
g.t = l
g.o = i
g.y = j
g.s = d
f.y = j
f.r = j
f.q = c
m.t = a
m.o = f
m.y = j
m.s = g
assert d.o.r.r.y.o.r.s.txt == "m"