class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: A = None
        self.y: A = None
        self.r: F = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.z: E = None
        self.r: H = None
        self.u: I = None
        self.p: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: A = None
        self.y: A = None
        self.r: F = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.z: E = None
        self.r: H = None
        self.u: I = None
        self.p: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

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

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