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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.t: G = None
        self.s: F = None
        self.z: D = None
        self.p: G = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.w: C = None
        self.z: C = None
        self.o: E = None
        self.y: E = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: D = None
        self.q: B = None
        self.s: D = None
        self.t: D = None
        self.txt = txt

k = A("k")
j = B("j")
c = C("c")
l = D("l")
f = E("f")
a = F("a")
m = G("m")
i = C("i")

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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.t: G = None
        self.s: F = None
        self.z: D = None
        self.p: G = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: A = None
        self.w: C = None
        self.z: C = None
        self.o: E = None
        self.y: E = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: D = None
        self.q: B = None
        self.s: D = None
        self.t: D = None
        self.txt = txt

k = A("k")
j = B("j")
c = C("c")
l = D("l")
f = E("f")
a = F("a")
m = G("m")
i = C("i")

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