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

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

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

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

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

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

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

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

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

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

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

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

c.t = e
c.o = b
i.v = l
b.w = f
g.r = e
g.z = d
g.s = b
g.w = n
m.v = c
m.w = b
m.s = b
m.y = i
n.r = e
n.z = d
n.w = d
n.s = b
f.v = l
e.t = c
e.o = b
l.v = c
l.w = b
l.s = b
l.y = i
d.r = c
d.z = g
d.w = g
d.s = b
assert n.w.s.w.v.v.o.w.v.s.txt == "b"