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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: G = None
        self.t: D = None
        self.x: F = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: G = None
        self.t: D = None
        self.x: F = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: C = None
        self.txt = txt

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

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