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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.q: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.v: C = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

n = A("n")
h = B("h")
f = C("f")
a = D("a")
m = E("m")
i = F("i")
l = B("l")

n.u = f
n.o = f
n.z = l
n.y = l
h.r = m
h.o = m
h.q = l
h.u = n
f.s = n
f.x = n
f.t = m
f.r = l
a.s = i
a.u = f
a.p = f
a.x = m
a.o = m
m.x = i
m.v = i
m.q = a
m.o = h
i.o = n
i.u = n
i.z = n
i.v = f
i.s = h
l.r = m
l.o = m
l.q = h
l.u = n
assert h.u.u.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.q: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.v: C = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

n = A("n")
h = B("h")
f = C("f")
a = D("a")
m = E("m")
i = F("i")
l = B("l")

n.u = f
n.o = f
n.z = l
n.y = l
h.r = m
h.o = m
h.q = l
h.u = n
f.s = n
f.x = n
f.t = m
f.r = l
a.s = i
a.u = f
a.p = f
a.x = m
a.o = m
m.x = i
m.v = i
m.q = a
m.o = h
i.o = n
i.u = n
i.z = n
i.v = f
i.s = h
l.r = m
l.o = m
l.q = h
l.u = n
assert h.u.u.s.y.txt == "l"