class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: B = None
        self.u: C = None
        self.r: H = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: E = None
        self.w: G = None
        self.q: H = None
        self.z: F = None
        self.s: H = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: F = None
        self.o: I = None
        self.w: H = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.y: C = None
        self.v: A = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: F = None
        self.y: H = None
        self.r: A = None
        self.t: C = None
        self.s: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: C = None
        self.w: I = None
        self.p: B = None
        self.y: A = None
        self.t: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: E = None
        self.w: G = None
        self.q: H = None
        self.z: F = None
        self.s: H = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: F = None
        self.o: I = None
        self.w: H = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.y: C = None
        self.v: A = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: F = None
        self.y: H = None
        self.r: A = None
        self.t: C = None
        self.s: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: C = None
        self.w: I = None
        self.p: B = None
        self.y: A = None
        self.t: B = None
        self.x: A = None
        self.txt = txt

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

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

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