class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: C = None
        self.v: I = None
        self.s: H = None
        self.y: D = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.z: A = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.w: E = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: B = None
        self.o: D = None
        self.r: C = None
        self.w: B = None
        self.q: G = None
        self.p: E = None
        self.y: B = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.p: E = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: D = None
        self.s: I = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.z: A = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: C = None
        self.w: E = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: B = None
        self.o: D = None
        self.r: C = None
        self.w: B = None
        self.q: G = None
        self.p: E = None
        self.y: B = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.p: E = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: D = None
        self.s: I = None
        self.u: A = None
        self.txt = txt

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

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

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