class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.x: C = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.w: H = None
        self.r: C = None
        self.p: H = None
        self.q: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.x: B = None
        self.s: D = None
        self.y: H = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

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

m = A("m")
a = B("a")
i = C("i")
l = D("l")
d = E("d")
n = F("n")
b = G("b")
j = H("j")

m.o = d
m.p = l
m.x = i
m.v = j
a.x = n
a.s = m
a.w = j
a.p = j
a.q = j
a.t = j
a.r = i
i.w = a
i.u = b
l.x = d
l.w = j
l.u = i
l.t = i
l.v = n
l.p = n
l.o = m
l.s = a
d.x = j
d.p = m
d.z = m
d.r = a
d.s = a
d.q = n
n.r = i
n.w = i
b.z = a
b.x = a
b.u = n
b.s = l
b.v = l
b.y = j
b.p = j
j.o = b
assert m.o.x.o.x.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.x: C = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.w: H = None
        self.r: C = None
        self.p: H = None
        self.q: H = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.x: B = None
        self.s: D = None
        self.y: H = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

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

m = A("m")
a = B("a")
i = C("i")
l = D("l")
d = E("d")
n = F("n")
b = G("b")
j = H("j")

m.o = d
m.p = l
m.x = i
m.v = j
a.x = n
a.s = m
a.w = j
a.p = j
a.q = j
a.t = j
a.r = i
i.w = a
i.u = b
l.x = d
l.w = j
l.u = i
l.t = i
l.v = n
l.p = n
l.o = m
l.s = a
d.x = j
d.p = m
d.z = m
d.r = a
d.s = a
d.q = n
n.r = i
n.w = i
b.z = a
b.x = a
b.u = n
b.s = l
b.v = l
b.y = j
b.p = j
j.o = b
assert m.o.x.o.x.s.x.txt == "i"