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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.t: B = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: G = None
        self.z: D = None
        self.s: B = None
        self.t: G = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: B = None
        self.z: D = None
        self.v: B = None
        self.txt = txt

g = A("g")
e = B("e")
j = C("j")
i = D("i")
f = E("f")
a = F("a")
c = G("c")
h = H("h")
m = G("m")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.t: B = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: G = None
        self.z: D = None
        self.s: B = None
        self.t: G = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: B = None
        self.z: D = None
        self.v: B = None
        self.txt = txt

g = A("g")
e = B("e")
j = C("j")
i = D("i")
f = E("f")
a = F("a")
c = G("c")
h = H("h")
m = G("m")

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