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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: F = None
        self.r: E = None
        self.y: A = None
        self.w: E = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.r: H = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.v: G = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: I = None
        self.v: G = None
        self.r: H = None
        self.y: H = None
        self.q: G = None
        self.s: I = None
        self.z: A = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: F = None
        self.r: E = None
        self.y: A = None
        self.w: E = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.r: H = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.v: G = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: I = None
        self.v: G = None
        self.r: H = None
        self.y: H = None
        self.q: G = None
        self.s: I = None
        self.z: A = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

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

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