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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: D = None
        self.o: G = None
        self.y: G = None
        self.v: I = None
        self.x: H = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.v: E = None
        self.u: G = None
        self.x: E = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.y: B = None
        self.w: C = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.s: D = None
        self.x: F = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.o: E = None
        self.r: G = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: D = None
        self.o: G = None
        self.y: G = None
        self.v: I = None
        self.x: H = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.v: E = None
        self.u: G = None
        self.x: E = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.y: B = None
        self.w: C = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.s: D = None
        self.x: F = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.o: E = None
        self.r: G = None
        self.y: C = None
        self.txt = txt

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

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