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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
b = C("b")
l = D("l")
h = E("h")
k = F("k")

i.u = h
i.y = k
i.w = l
i.o = l
i.p = d
d.t = b
d.s = i
b.s = i
b.w = k
b.r = h
l.s = d
l.q = d
l.x = k
h.x = l
h.o = k
k.v = i
k.t = h
assert i.y.t.x.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.w: D = None
        self.p: B = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

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

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

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

i = A("i")
d = B("d")
b = C("b")
l = D("l")
h = E("h")
k = F("k")

i.u = h
i.y = k
i.w = l
i.o = l
i.p = d
d.t = b
d.s = i
b.s = i
b.w = k
b.r = h
l.s = d
l.q = d
l.x = k
h.x = l
h.o = k
k.v = i
k.t = h
assert i.y.t.x.q.s.txt == "i"