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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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