class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: G = None
        self.z: B = None
        self.t: A = None
        self.v: C = None
        self.q: A = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: I = None
        self.q: C = None
        self.x: E = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.y: I = None
        self.s: I = None
        self.o: A = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.z: G = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: G = None
        self.z: B = None
        self.t: A = None
        self.v: C = None
        self.q: A = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: I = None
        self.q: C = None
        self.x: E = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.y: I = None
        self.s: I = None
        self.o: A = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.z: G = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

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

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