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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: B = None
        self.v: G = None
        self.s: B = None
        self.p: A = None
        self.y: I = None
        self.u: I = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: G = None
        self.v: I = None
        self.w: I = None
        self.p: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: B = None
        self.v: G = None
        self.s: B = None
        self.p: A = None
        self.y: I = None
        self.u: I = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: G = None
        self.v: I = None
        self.w: I = None
        self.p: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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