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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: C = None
        self.o: C = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: D = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.x: C = None
        self.q: H = None
        self.w: A = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

g = A("g")
n = B("n")
c = C("c")
d = D("d")
h = E("h")
f = F("f")
l = G("l")
b = H("b")
a = I("a")

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: C = None
        self.o: C = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: D = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.x: C = None
        self.q: H = None
        self.w: A = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

g = A("g")
n = B("n")
c = C("c")
d = D("d")
h = E("h")
f = F("f")
l = G("l")
b = H("b")
a = I("a")

g.w = c
g.v = c
g.s = a
g.y = a
g.q = d
g.z = d
g.r = d
g.p = f
g.o = h
n.y = h
n.v = h
n.z = c
n.o = c
n.p = f
c.o = a
c.z = a
c.w = d
d.q = n
d.z = h
d.t = b
d.y = a
d.s = g
d.r = g
d.o = l
d.w = l
h.w = n
f.u = h
f.t = h
f.s = b
f.q = b
f.x = c
f.w = g
f.z = d
l.t = c
b.p = h
b.t = f
a.p = d
a.u = f
a.t = l
assert c.o.t.t.w.o.t.w.q.txt == "n"