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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: G = None
        self.x: F = None
        self.z: B = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.u: E = None
        self.txt = txt

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

f = A("f")
j = B("j")
g = C("g")
m = D("m")
k = E("k")
h = F("h")
l = G("l")
n = H("n")
d = I("d")

f.s = l
f.q = n
f.x = g
f.t = j
f.v = d
j.z = n
j.u = h
g.y = h
g.x = h
g.v = l
g.z = j
g.w = d
m.s = k
m.p = d
m.y = d
k.v = d
k.r = n
h.y = k
h.p = f
h.u = d
h.w = m
h.s = g
h.x = n
l.s = f
l.z = g
l.r = k
l.y = n
l.v = h
l.o = h
n.v = h
n.o = j
n.u = k
d.y = j
d.q = g
d.o = g
d.p = k
d.s = k
assert h.x.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.x: C = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: G = None
        self.x: F = None
        self.z: B = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.u: E = None
        self.txt = txt

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

f = A("f")
j = B("j")
g = C("g")
m = D("m")
k = E("k")
h = F("h")
l = G("l")
n = H("n")
d = I("d")

f.s = l
f.q = n
f.x = g
f.t = j
f.v = d
j.z = n
j.u = h
g.y = h
g.x = h
g.v = l
g.z = j
g.w = d
m.s = k
m.p = d
m.y = d
k.v = d
k.r = n
h.y = k
h.p = f
h.u = d
h.w = m
h.s = g
h.x = n
l.s = f
l.z = g
l.r = k
l.y = n
l.v = h
l.o = h
n.v = h
n.o = j
n.u = k
d.y = j
d.q = g
d.o = g
d.p = k
d.s = k
assert h.x.v.x.txt == "n"