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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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

l = A("l")
j = B("j")
h = C("h")
i = D("i")
c = E("c")
b = F("b")
e = A("e")

l.s = c
l.u = e
l.q = i
j.p = h
j.r = h
j.o = i
j.w = i
h.s = i
i.s = h
c.p = b
b.t = h
b.y = j
b.o = c
e.s = c
e.u = l
e.q = i
assert i.s.s.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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

l = A("l")
j = B("j")
h = C("h")
i = D("i")
c = E("c")
b = F("b")
e = A("e")

l.s = c
l.u = e
l.q = i
j.p = h
j.r = h
j.o = i
j.w = i
h.s = i
i.s = h
c.p = b
b.t = h
b.y = j
b.o = c
e.s = c
e.u = l
e.q = i
assert i.s.s.s.s.txt == "i"