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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.q: F = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: F = None
        self.o: F = None
        self.r: C = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.t: E = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: C = None
        self.q: F = None
        self.z: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: F = None
        self.o: F = None
        self.r: C = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.t: E = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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