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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.o: C = None
        self.w: I = None
        self.x: B = None
        self.p: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.o: C = None
        self.w: I = None
        self.x: B = None
        self.p: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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