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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.p: A = None
        self.t: B = None
        self.v: D = None
        self.u: A = None
        self.y: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.r: A = None
        self.o: G = None
        self.u: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.p: A = None
        self.t: B = None
        self.v: D = None
        self.u: A = None
        self.y: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.r: A = None
        self.o: G = None
        self.u: F = None
        self.v: C = None
        self.txt = txt

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

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