class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: F = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.x: A = None
        self.p: G = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.v: F = None
        self.w: I = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: F = None
        self.r: C = None
        self.x: C = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.x: A = None
        self.p: G = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.v: F = None
        self.w: I = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: F = None
        self.r: C = None
        self.x: C = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

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