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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: I = None
        self.u: E = None
        self.y: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.t: I = None
        self.u: G = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.u: H = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.v: D = None
        self.o: I = None
        self.p: A = None
        self.z: F = None
        self.q: D = None
        self.t: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: I = None
        self.u: E = None
        self.y: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.t: I = None
        self.u: G = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.u: H = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.v: D = None
        self.o: I = None
        self.p: A = None
        self.z: F = None
        self.q: D = None
        self.t: A = None
        self.txt = txt

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

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

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