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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: F = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: G = None
        self.v: F = None
        self.q: E = None
        self.u: G = None
        self.w: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: F = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: G = None
        self.v: F = None
        self.q: E = None
        self.u: G = None
        self.w: A = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

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