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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: I = None
        self.t: E = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: G = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: I = None
        self.r: G = None
        self.o: B = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.r: H = None
        self.x: H = None
        self.t: D = None
        self.w: D = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.y: E = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: H = None
        self.v: A = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: I = None
        self.t: E = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: G = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: I = None
        self.r: G = None
        self.o: B = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.r: H = None
        self.x: H = None
        self.t: D = None
        self.w: D = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.y: E = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: H = None
        self.v: A = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

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

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