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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.z: C = None
        self.t: H = None
        self.s: C = None
        self.o: C = None
        self.r: D = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.z: C = None
        self.t: H = None
        self.s: C = None
        self.o: C = None
        self.r: D = None
        self.v: F = None
        self.txt = txt

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

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