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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: I = None
        self.s: E = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: E = None
        self.z: F = None
        self.s: G = None
        self.w: H = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: C = None
        self.x: A = None
        self.p: C = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: I = None
        self.r: C = None
        self.o: B = None
        self.s: C = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: I = None
        self.s: E = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: E = None
        self.z: F = None
        self.s: G = None
        self.w: H = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: C = None
        self.x: A = None
        self.p: C = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: I = None
        self.r: C = None
        self.o: B = None
        self.s: C = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

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

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