class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: H = None
        self.p: E = None
        self.x: F = None
        self.v: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: H = None
        self.q: E = None
        self.o: C = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.u: D = None
        self.p: D = None
        self.w: A = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.v: H = None
        self.q: H = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: H = None
        self.q: E = None
        self.o: C = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.u: D = None
        self.p: D = None
        self.w: A = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.v: H = None
        self.q: H = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

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

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

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