class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.t: I = None
        self.q: C = None
        self.p: I = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: B = None
        self.r: C = None
        self.o: I = None
        self.q: E = None
        self.p: E = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.p: C = None
        self.q: A = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.t: I = None
        self.q: C = None
        self.p: I = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: B = None
        self.r: C = None
        self.o: I = None
        self.q: E = None
        self.p: E = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.p: C = None
        self.q: A = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

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