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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: B = None
        self.w: C = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: B = None
        self.w: C = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

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

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