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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: H = None
        self.y: F = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.y: B = None
        self.o: B = None
        self.z: D = None
        self.u: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: C = None
        self.o: F = None
        self.t: B = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.u: B = None
        self.q: I = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: H = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

g = A("g")
i = B("i")
d = C("d")
m = D("m")
e = E("e")
j = F("j")
n = G("n")
a = H("a")
h = I("h")
f = I("f")

g.x = e
g.z = e
g.w = a
g.v = m
g.r = d
g.q = n
i.t = n
i.u = a
i.y = j
i.o = h
d.v = n
d.r = j
d.y = i
d.o = i
d.z = m
d.u = a
d.w = f
m.w = n
m.v = n
m.r = d
m.o = j
m.t = i
e.t = n
e.s = n
e.x = i
e.u = i
e.q = h
j.y = g
j.o = g
j.w = a
j.q = i
n.x = g
n.y = g
n.s = m
n.r = m
n.w = f
n.q = h
n.v = j
n.t = e
n.p = d
a.r = d
a.w = j
a.z = e
h.z = d
h.r = g
h.u = g
h.y = j
h.v = j
h.p = j
h.x = m
f.z = d
f.r = g
f.u = g
f.y = j
f.v = j
f.p = j
f.x = m
assert d.u.r.o.o.x.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.w: H = None
        self.v: D = None
        self.r: C = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: H = None
        self.y: F = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: F = None
        self.y: B = None
        self.o: B = None
        self.z: D = None
        self.u: H = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: C = None
        self.o: F = None
        self.t: B = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.u: B = None
        self.q: I = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: H = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

g = A("g")
i = B("i")
d = C("d")
m = D("m")
e = E("e")
j = F("j")
n = G("n")
a = H("a")
h = I("h")
f = I("f")

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