class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.o: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: C = None
        self.z: F = None
        self.s: G = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.o: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: C = None
        self.z: F = None
        self.s: G = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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

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