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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.x: C = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.o: A = None
        self.p: D = None
        self.t: F = None
        self.x: B = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.x: C = None
        self.w: D = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.o: A = None
        self.p: D = None
        self.t: F = None
        self.x: B = None
        self.s: A = None
        self.txt = txt

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

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

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