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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: D = None
        self.w: E = None
        self.u: D = None
        self.t: E = None
        self.txt = txt

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

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

g = A("g")
f = B("f")
b = C("b")
j = D("j")
h = E("h")
e = C("e")
i = B("i")

g.v = h
f.z = e
f.o = b
f.x = b
f.w = j
f.y = h
b.y = e
b.q = j
b.u = j
b.w = h
b.t = h
j.v = e
j.w = i
j.y = b
j.t = g
j.x = g
h.v = j
h.p = j
h.u = j
h.t = e
h.w = i
e.y = b
e.q = j
e.u = j
e.w = h
e.t = h
i.z = e
i.o = b
i.x = b
i.w = j
i.y = h
assert i.x.y.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: D = None
        self.w: E = None
        self.u: D = None
        self.t: E = None
        self.txt = txt

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

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

g = A("g")
f = B("f")
b = C("b")
j = D("j")
h = E("h")
e = C("e")
i = B("i")

g.v = h
f.z = e
f.o = b
f.x = b
f.w = j
f.y = h
b.y = e
b.q = j
b.u = j
b.w = h
b.t = h
j.v = e
j.w = i
j.y = b
j.t = g
j.x = g
h.v = j
h.p = j
h.u = j
h.t = e
h.w = i
e.y = b
e.q = j
e.u = j
e.w = h
e.t = h
i.z = e
i.o = b
i.x = b
i.w = j
i.y = h
assert i.x.y.t.w.txt == "i"