class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: F = None
        self.x: E = None
        self.o: I = None
        self.p: H = None
        self.y: C = 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: A = None
        self.v: H = None
        self.y: F = None
        self.r: A = None
        self.s: A = None
        self.t: I = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

l = A("l")
m = B("m")
j = C("j")
d = D("d")
f = E("f")
a = F("a")
g = G("g")
k = H("k")
n = I("n")
i = E("i")

l.q = d
l.w = a
l.x = i
l.o = n
l.p = k
l.y = j
m.r = g
j.u = l
j.r = l
j.s = l
j.v = k
j.x = k
j.z = k
j.y = a
j.t = n
d.o = g
d.w = n
d.v = n
d.z = k
d.p = j
d.y = l
f.s = g
f.x = n
f.o = n
a.x = l
a.w = m
g.q = k
g.p = k
g.x = l
g.z = f
g.u = j
g.o = j
g.v = n
g.t = n
k.u = d
k.x = i
n.s = m
n.u = a
n.o = i
n.z = j
n.p = j
n.t = j
n.y = l
n.x = d
i.s = g
i.x = n
i.o = n
assert g.o.y.x.w.x.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: F = None
        self.x: E = None
        self.o: I = None
        self.p: H = None
        self.y: C = 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: A = None
        self.v: H = None
        self.y: F = None
        self.r: A = None
        self.s: A = None
        self.t: I = None
        self.x: H = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

l = A("l")
m = B("m")
j = C("j")
d = D("d")
f = E("f")
a = F("a")
g = G("g")
k = H("k")
n = I("n")
i = E("i")

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