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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.w: A = None
        self.s: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: D = None
        self.w: A = None
        self.s: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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