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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

l = A("l")
k = B("k")
j = C("j")
f = D("f")
h = E("h")
b = F("b")
m = E("m")

l.o = k
l.y = k
k.y = j
j.s = l
j.t = l
j.z = l
j.o = l
j.u = b
j.r = m
f.y = l
h.t = b
h.o = m
h.w = k
h.z = j
b.v = l
b.r = m
b.o = j
b.y = j
b.z = f
m.t = b
m.o = h
m.w = k
m.z = j
assert h.w.y.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

l = A("l")
k = B("k")
j = C("j")
f = D("f")
h = E("h")
b = F("b")
m = E("m")

l.o = k
l.y = k
k.y = j
j.s = l
j.t = l
j.z = l
j.o = l
j.u = b
j.r = m
f.y = l
h.t = b
h.o = m
h.w = k
h.z = j
b.v = l
b.r = m
b.o = j
b.y = j
b.z = f
m.t = b
m.o = h
m.w = k
m.z = j
assert h.w.y.u.v.txt == "l"