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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.r: F = None
        self.w: A = None
        self.x: D = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: A = None
        self.p: G = None
        self.z: B = None
        self.q: B = None
        self.w: C = None
        self.x: C = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: I = None
        self.p: F = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: F = None
        self.x: D = None
        self.q: D = None
        self.z: E = None
        self.r: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.r: F = None
        self.w: A = None
        self.x: D = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: A = None
        self.p: G = None
        self.z: B = None
        self.q: B = None
        self.w: C = None
        self.x: C = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: I = None
        self.p: F = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: F = None
        self.x: D = None
        self.q: D = None
        self.z: E = None
        self.r: I = None
        self.txt = txt

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

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

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