class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.t: G = None
        self.r: B = None
        self.x: A = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.s: B = None
        self.q: I = None
        self.w: B = None
        self.t: G = None
        self.y: G = None
        self.v: G = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.w: I = None
        self.o: I = None
        self.x: A = None
        self.v: I = None
        self.y: H = None
        self.u: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: E = None
        self.t: G = None
        self.o: B = None
        self.txt = txt

k = A("k")
i = B("i")
h = C("h")
m = D("m")
c = E("c")
g = F("g")
b = G("b")
a = H("a")
f = I("f")
l = A("l")

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.s: B = None
        self.q: I = None
        self.w: B = None
        self.t: G = None
        self.y: G = None
        self.v: G = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: H = None
        self.w: I = None
        self.o: I = None
        self.x: A = None
        self.v: I = None
        self.y: H = None
        self.u: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: E = None
        self.t: G = None
        self.o: B = None
        self.txt = txt

k = A("k")
i = B("i")
h = C("h")
m = D("m")
c = E("c")
g = F("g")
b = G("b")
a = H("a")
f = I("f")
l = A("l")

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