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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: H = None
        self.o: B = None
        self.z: D = None
        self.s: G = None
        self.r: I = None
        self.y: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: D = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: E = None
        self.q: E = None
        self.v: H = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: I = None
        self.p: D = None
        self.q: I = None
        self.u: E = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: H = None
        self.o: B = None
        self.z: D = None
        self.s: G = None
        self.r: I = None
        self.y: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: D = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: E = None
        self.q: E = None
        self.v: H = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: I = None
        self.p: D = None
        self.q: I = None
        self.u: E = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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