class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: I = None
        self.r: H = None
        self.s: E = None
        self.q: C = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.w: I = None
        self.x: B = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.w: I = None
        self.x: B = None
        self.z: I = None
        self.txt = txt

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

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

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