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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.z: A = None
        self.x: C = None
        self.w: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: G = None
        self.o: B = None
        self.v: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.z: A = None
        self.x: C = None
        self.w: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: G = None
        self.o: B = None
        self.v: G = None
        self.x: H = None
        self.txt = txt

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

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