class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: F = None
        self.z: E = None
        self.u: H = None
        self.w: C = None
        self.q: C = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: A = None
        self.r: D = None
        self.p: E = None
        self.q: G = None
        self.z: F = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: E = None
        self.r: G = None
        self.p: E = None
        self.u: G = None
        self.q: H = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.y: G = None
        self.x: D = None
        self.w: D = None
        self.o: B = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.x: F = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: A = None
        self.r: D = None
        self.p: E = None
        self.q: G = None
        self.z: F = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: E = None
        self.r: G = None
        self.p: E = None
        self.u: G = None
        self.q: H = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.y: G = None
        self.x: D = None
        self.w: D = None
        self.o: B = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.x: F = None
        self.y: G = None
        self.txt = txt

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

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