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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: E = None
        self.y: H = None
        self.z: C = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.x: H = None
        self.z: F = None
        self.y: E = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.s: F = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.r: H = None
        self.w: I = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.s: G = None
        self.p: G = None
        self.r: D = None
        self.y: I = None
        self.z: C = None
        self.q: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: E = None
        self.y: H = None
        self.z: C = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.x: H = None
        self.z: F = None
        self.y: E = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.s: F = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.r: H = None
        self.w: I = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.s: G = None
        self.p: G = None
        self.r: D = None
        self.y: I = None
        self.z: C = None
        self.q: B = None
        self.txt = txt

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

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

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