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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: C = None
        self.w: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: C = None
        self.w: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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