class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: A = None
        self.p: E = None
        self.x: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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