class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: B = None
        self.w: A = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.p: C = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: I = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: I = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.v: H = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: C = None
        self.v: I = None
        self.y: D = None
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.p: C = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: I = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: I = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.v: H = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: C = None
        self.v: I = None
        self.y: D = None
        self.o: F = None
        self.txt = txt

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

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

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