class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: B = None
        self.x: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.x: G = None
        self.q: D = None
        self.r: G = None
        self.y: F = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.x: G = None
        self.q: D = None
        self.r: G = None
        self.y: F = None
        self.z: G = None
        self.txt = txt

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

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

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