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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.q: D = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.q: D = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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