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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.txt = txt

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

h = A("h")
a = B("a")
i = C("i")
n = D("n")
d = E("d")
j = F("j")
e = F("e")

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.u: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.txt = txt

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

h = A("h")
a = B("a")
i = C("i")
n = D("n")
d = E("d")
j = F("j")
e = F("e")

h.t = d
h.o = d
h.u = a
a.v = h
a.w = i
i.o = d
i.y = e
i.u = h
i.q = a
n.r = d
d.t = a
d.w = e
j.t = n
j.s = n
j.v = i
j.w = d
j.q = a
j.o = h
e.t = n
e.s = n
e.v = i
e.w = d
e.q = a
e.o = h
assert d.w.w.w.o.u.txt == "a"