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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: H = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: F = None
        self.u: D = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

d = A("d")
j = B("j")
h = C("h")
a = D("a")
e = E("e")
b = F("b")
n = G("n")
i = H("i")
c = I("c")

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: H = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: F = None
        self.u: D = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

d = A("d")
j = B("j")
h = C("h")
a = D("a")
e = E("e")
b = F("b")
n = G("n")
i = H("i")
c = I("c")

d.w = a
d.v = a
d.t = a
d.o = a
d.y = a
d.q = j
d.x = c
d.s = i
d.u = e
j.z = n
j.y = n
j.o = b
h.s = j
a.u = c
e.z = i
b.x = n
n.z = d
n.p = i
n.o = a
n.y = h
i.s = b
c.x = d
c.s = b
c.r = b
c.u = a
c.o = h
assert e.z.s.x.p.s.x.y.s.y.txt == "n"