class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: I = None
        self.u: A = None
        self.r: F = None
        self.x: C = None
        self.t: C = None
        self.w: H = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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