class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: G = None
        self.x: B = None
        self.s: I = None
        self.r: I = None
        self.z: F = None
        self.o: D = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.s: H = None
        self.p: F = None
        self.q: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: H = None
        self.p: A = None
        self.r: H = None
        self.s: E = None
        self.y: G = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.s: D = None
        self.t: G = None
        self.o: G = None
        self.y: F = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.s: H = None
        self.p: F = None
        self.q: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: H = None
        self.p: A = None
        self.r: H = None
        self.s: E = None
        self.y: G = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.s: D = None
        self.t: G = None
        self.o: G = None
        self.y: F = None
        self.v: H = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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