class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: F = None
        self.p: G = None
        self.y: C = None
        self.z: G = None
        self.t: I = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.x: D = None
        self.o: D = None
        self.z: H = None
        self.r: D = None
        self.v: I = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: H = None
        self.r: D = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.x: D = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.x: D = None
        self.o: D = None
        self.z: H = None
        self.r: D = None
        self.v: I = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: H = None
        self.r: D = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.x: D = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.x: D = None
        self.txt = txt

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

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

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