class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: D = None
        self.w: H = None
        self.s: G = None
        self.x: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: C = None
        self.q: A = None
        self.y: G = None
        self.s: E = None
        self.p: B = None
        self.x: G = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.o: E = None
        self.r: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: C = None
        self.q: A = None
        self.y: G = None
        self.s: E = None
        self.p: B = None
        self.x: G = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.o: E = None
        self.r: H = None
        self.x: A = None
        self.txt = txt

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

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