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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: A = None
        self.t: H = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: B = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.z: C = None
        self.r: E = None
        self.q: I = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: A = None
        self.t: H = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: B = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.z: C = None
        self.r: E = None
        self.q: I = None
        self.u: D = None
        self.txt = txt

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

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

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