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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

i = A("i")
l = B("l")
j = C("j")
n = D("n")
g = E("g")
f = F("f")
a = E("a")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

i = A("i")
l = B("l")
j = C("j")
n = D("n")
g = E("g")
f = F("f")
a = E("a")

i.y = f
i.q = l
i.x = j
l.s = a
j.y = a
n.w = l
g.s = l
g.y = j
g.z = a
g.u = i
f.y = j
f.u = j
f.p = g
f.s = i
f.o = l
f.t = l
a.s = l
a.y = j
a.z = g
a.u = i
assert a.y.y.y.y.z.z.txt == "a"