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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.q: G = None
        self.o: A = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.r: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.z: G = None
        self.s: D = None
        self.o: E = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

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

k = A("k")
b = B("b")
h = C("h")
j = D("j")
i = E("i")
e = F("e")
l = G("l")
a = D("a")
f = A("f")

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.q: G = None
        self.o: A = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.r: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.z: G = None
        self.s: D = None
        self.o: E = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

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

k = A("k")
b = B("b")
h = C("h")
j = D("j")
i = E("i")
e = F("e")
l = G("l")
a = D("a")
f = A("f")

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