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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.s: A = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.w: E = None
        self.v: H = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: E = None
        self.x: I = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.s: A = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.w: E = None
        self.v: H = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: E = None
        self.x: I = None
        self.t: F = None
        self.txt = txt

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

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

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

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