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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: F = None
        self.o: A = None
        self.z: D = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

h = A("h")
m = B("m")
k = C("k")
e = D("e")
i = E("i")
n = F("n")
b = E("b")
a = D("a")

h.u = k
h.o = k
h.p = b
h.y = e
h.s = e
m.w = h
k.t = m
k.s = m
e.w = b
e.x = a
e.z = k
e.t = i
i.v = k
i.y = n
i.o = h
i.z = a
i.t = e
i.p = b
n.x = i
b.v = k
b.y = n
b.o = h
b.z = e
b.t = a
b.p = i
a.w = i
a.t = i
a.x = e
a.z = k
assert e.w.t.x.x.t.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: E = None
        self.y: D = None
        self.o: C = None
        self.s: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: F = None
        self.o: A = None
        self.z: D = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

h = A("h")
m = B("m")
k = C("k")
e = D("e")
i = E("i")
n = F("n")
b = E("b")
a = D("a")

h.u = k
h.o = k
h.p = b
h.y = e
h.s = e
m.w = h
k.t = m
k.s = m
e.w = b
e.x = a
e.z = k
e.t = i
i.v = k
i.y = n
i.o = h
i.z = a
i.t = e
i.p = b
n.x = i
b.v = k
b.y = n
b.o = h
b.z = e
b.t = a
b.p = i
a.w = i
a.t = i
a.x = e
a.z = k
assert e.w.t.x.x.t.y.x.txt == "i"