class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: F = None
        self.z: I = None
        self.q: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.r: A = None
        self.s: G = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.v: A = None
        self.s: A = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.r: A = None
        self.s: G = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.v: A = None
        self.s: A = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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