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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: B = None
        self.y: I = None
        self.z: B = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: B = None
        self.y: I = None
        self.z: B = None
        self.v: G = None
        self.txt = txt

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

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