class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.s: D = None
        self.p: F = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.s: D = None
        self.p: F = None
        self.q: E = None
        self.txt = txt

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

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