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

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: C = None
        self.s: E = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.x: A = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

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

g = A("g")
n = B("n")
k = C("k")
h = D("h")
i = E("i")
l = C("l")
f = D("f")

g.w = i
g.y = i
g.u = i
n.y = i
n.q = i
n.z = f
k.p = l
k.o = l
k.s = i
k.z = n
h.r = f
h.t = i
h.y = i
h.x = g
h.p = n
i.y = n
i.w = n
i.o = g
l.p = k
l.o = k
l.s = i
l.z = n
f.r = h
f.t = i
f.y = i
f.x = g
f.p = n
assert h.x.w.o.w.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: C = None
        self.s: E = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.x: A = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

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

g = A("g")
n = B("n")
k = C("k")
h = D("h")
i = E("i")
l = C("l")
f = D("f")

g.w = i
g.y = i
g.u = i
n.y = i
n.q = i
n.z = f
k.p = l
k.o = l
k.s = i
k.z = n
h.r = f
h.t = i
h.y = i
h.x = g
h.p = n
i.y = n
i.w = n
i.o = g
l.p = k
l.o = k
l.s = i
l.z = n
f.r = h
f.t = i
f.y = i
f.x = g
f.p = n
assert h.x.w.o.w.o.u.txt == "i"