class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.q: D = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.txt = txt

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

c = A("c")
f = B("f")
l = C("l")
i = D("i")
n = E("n")
d = A("d")
b = C("b")
a = B("a")
h = D("h")

c.w = d
c.t = d
c.p = n
c.o = n
c.q = i
f.o = i
f.u = i
f.q = d
l.p = b
l.x = f
l.s = i
i.q = a
i.z = d
n.o = l
n.t = d
n.u = i
n.s = i
d.w = c
d.t = c
d.p = n
d.o = n
d.q = h
b.p = l
b.x = f
b.s = h
a.o = h
a.q = d
a.u = i
h.q = f
h.z = d
assert f.q.q.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.q: D = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.txt = txt

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

c = A("c")
f = B("f")
l = C("l")
i = D("i")
n = E("n")
d = A("d")
b = C("b")
a = B("a")
h = D("h")

c.w = d
c.t = d
c.p = n
c.o = n
c.q = i
f.o = i
f.u = i
f.q = d
l.p = b
l.x = f
l.s = i
i.q = a
i.z = d
n.o = l
n.t = d
n.u = i
n.s = i
d.w = c
d.t = c
d.p = n
d.o = n
d.q = h
b.p = l
b.x = f
b.s = h
a.o = h
a.q = d
a.u = i
h.q = f
h.z = d
assert f.q.q.q.u.txt == "i"