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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: G = None
        self.r: E = None
        self.s: B = None
        self.x: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

j.z = n
b.y = j
k.y = c
k.z = j
k.x = g
k.s = g
k.q = n
n.s = g
n.w = k
n.y = h
n.u = b
n.q = b
n.r = m
n.z = m
n.v = c
g.x = k
e.z = b
e.s = b
e.v = m
e.r = g
e.x = c
m.v = e
c.w = h
c.x = j
h.q = n
assert b.y.z.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: G = None
        self.r: E = None
        self.s: B = None
        self.x: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

j.z = n
b.y = j
k.y = c
k.z = j
k.x = g
k.s = g
k.q = n
n.s = g
n.w = k
n.y = h
n.u = b
n.q = b
n.r = m
n.z = m
n.v = c
g.x = k
e.z = b
e.s = b
e.v = m
e.r = g
e.x = c
m.v = e
c.w = h
c.x = j
h.q = n
assert b.y.z.z.v.txt == "e"