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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: I = None
        self.s: I = None
        self.x: B = None
        self.p: G = None
        self.v: A = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: G = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: C = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.t: A = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: I = None
        self.s: I = None
        self.x: B = None
        self.p: G = None
        self.v: A = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: G = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: C = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.t: A = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

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