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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: A = None
        self.q: E = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.q: H = None
        self.z: C = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: A = None
        self.q: E = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.q: H = None
        self.z: C = None
        self.w: E = None
        self.txt = txt

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

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

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

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