class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: G = None
        self.w: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: C = None
        self.w: A = None
        self.z: D = None
        self.r: E = None
        self.x: H = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.r: F = None
        self.z: G = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.y: I = None
        self.z: F = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.w: B = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: C = None
        self.w: A = None
        self.z: D = None
        self.r: E = None
        self.x: H = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.r: F = None
        self.z: G = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.y: I = None
        self.z: F = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.w: B = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

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

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