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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.w: H = None
        self.o: D = None
        self.p: B = None
        self.q: G = None
        self.v: C = None
        self.t: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: I = None
        self.s: E = None
        self.x: I = None
        self.w: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.w: H = None
        self.o: D = None
        self.p: B = None
        self.q: G = None
        self.v: C = None
        self.t: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: I = None
        self.s: E = None
        self.x: I = None
        self.w: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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