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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: A = None
        self.w: B = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

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

g.w = c
g.z = a
g.v = n
g.o = f
g.t = b
a.r = j
a.q = e
j.v = e
j.y = n
h.o = a
h.r = g
h.w = b
h.t = n
h.s = f
n.u = g
n.v = g
n.y = c
n.w = a
b.r = j
b.q = e
e.v = j
e.y = n
f.o = c
f.r = g
f.w = a
f.t = n
f.s = h
c.r = j
c.q = e
assert f.w.r.y.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.v: E = None
        self.o: D = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: A = None
        self.w: B = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

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

g.w = c
g.z = a
g.v = n
g.o = f
g.t = b
a.r = j
a.q = e
j.v = e
j.y = n
h.o = a
h.r = g
h.w = b
h.t = n
h.s = f
n.u = g
n.v = g
n.y = c
n.w = a
b.r = j
b.q = e
e.v = j
e.y = n
f.o = c
f.r = g
f.w = a
f.t = n
f.s = h
c.r = j
c.q = e
assert f.w.r.y.v.t.txt == "b"