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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.o: I = None
        self.u: C = None
        self.v: C = None
        self.x: C = None
        self.r: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.r: H = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.o: I = None
        self.u: C = None
        self.v: C = None
        self.x: C = None
        self.r: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.r: H = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.p: H = None
        self.txt = txt

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

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