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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.y: A = None
        self.p: B = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: C = None
        self.p: I = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.w: D = None
        self.p: E = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.y: A = None
        self.p: B = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: C = None
        self.p: I = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.w: D = None
        self.p: E = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

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

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